diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -11,6 +11,7 @@ #include "capabilities.h" #include "log.h" #include "log_colored.h" +#include "log_file.h" #include "utils.h" #include "redirector.h" #include "protocol_ssh.h" @@ -128,8 +129,12 @@ int main(int argc, char *argv[]) (void) argv; arg0 = argv[0]; - LOG_SET_FUNCS_VA(LOG_COLORED_FUNCS); + //LOG_SET_FUNCS_VA(LOG_COLORED_FUNCS); + log_file = strdup("./potd.log"); + LOG_SET_FUNCS_VA(LOG_FILE_FUNCS); //log_prio = DEBUG; + if (log_open()) + exit(EXIT_FAILURE); #ifdef HAVE_CONFIG_H N("%s (C) 2018 Toni Uhlig (%s)", PACKAGE_STRING, PACKAGE_BUGREPORT); #endif @@ -189,5 +194,6 @@ int main(int argc, char *argv[]) } else W2("Process with pid %d terminated", child_pid); } + log_close(); return 0; } |