change logfile location during restart

This commit is contained in:
razzor 2010-02-05 20:08:21 +01:00
parent 454894f55d
commit 4cebc53498

View File

@ -88,8 +88,6 @@ int main(int argc, char *argv[])
if (config_parse(config) < 0)
exit(1);
/* check logfile */
const char *logfile = config_get_string("global", "logfile", DEFAULT_LOGFILE);
if (!debug) {
/* check pidfile */
const char *pidfile = config_get_string("global", "pidfile", DEFAULT_PIDFILE);
@ -99,6 +97,7 @@ int main(int argc, char *argv[])
}
/* start logging */
const char *logfile = config_get_string("global", "logfile", DEFAULT_LOGFILE);
if (log_init(logfile) < 0)
exit(1);
@ -144,7 +143,7 @@ int main(int argc, char *argv[])
if (config_parse(config) < 0)
break;
logfile = config_get_string("global", "logfile", DEFAULT_LOGFILE);
const char *logfile = config_get_string("global", "logfile", DEFAULT_LOGFILE);
if (!debug && log_init(logfile) < 0)
break;