summaryrefslogtreecommitdiff
path: root/accel-pptpd/triton/log.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pptpd/triton/log.c')
-rw-r--r--accel-pptpd/triton/log.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/accel-pptpd/triton/log.c b/accel-pptpd/triton/log.c
new file mode 100644
index 0000000..39a9cb1
--- /dev/null
+++ b/accel-pptpd/triton/log.c
@@ -0,0 +1,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;
+}
+