if (logfile)
fclose(logfile);
- logfile=fopen("newserv.log","a");
+ logfile=fopen("logs/newserv.log","a");
}
void init_logfile() {
- logfile=fopen("newserv.log","a");
+ logfile=fopen("logs/newserv.log","a");
registerhook(HOOK_CORE_SIGUSR1, reopen_logfile);
}
+void fini_logfile() {
+ deregisterhook(HOOK_CORE_SIGUSR1, reopen_logfile);
+ fclose(logfile);
+}
+
void Error(char *source, int severity, char *reason, ... ) {
char buf[512];
va_list va;