summaryrefslogtreecommitdiff
path: root/accel-pptpd/triton/log.c
blob: 39a9cb1813bb8985fccfbfa9690099848236a6de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <stdio.h>

#include "triton_p.h"

static FILE *f_error;
static FILE *f_debug;

int log_init(void)
{
	char *log_error=conf_get_opt("core","log_error");
	char *log_debug=conf_get_opt("core","log_debug");

	if (log_error)
	{
		f_error=fopen(log_error,"a");
		if (!f_error)
		{
			perror("log:log_error:open");
			return -1;
		}
	}
	if (log_debug)
	{
		f_debug=fopen(log_debug,"a");
		if (!f_debug)
		{
			perror("log:log_debug:open");
			return -1;
		}
	}

	return 0;
}