change logfile location during restart
This commit is contained in:
parent
454894f55d
commit
4cebc53498
@ -88,8 +88,6 @@ int main(int argc, char *argv[])
|
|||||||
if (config_parse(config) < 0)
|
if (config_parse(config) < 0)
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
||||||
/* check logfile */
|
|
||||||
const char *logfile = config_get_string("global", "logfile", DEFAULT_LOGFILE);
|
|
||||||
if (!debug) {
|
if (!debug) {
|
||||||
/* check pidfile */
|
/* check pidfile */
|
||||||
const char *pidfile = config_get_string("global", "pidfile", DEFAULT_PIDFILE);
|
const char *pidfile = config_get_string("global", "pidfile", DEFAULT_PIDFILE);
|
||||||
@ -99,6 +97,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* start logging */
|
/* start logging */
|
||||||
|
const char *logfile = config_get_string("global", "logfile", DEFAULT_LOGFILE);
|
||||||
if (log_init(logfile) < 0)
|
if (log_init(logfile) < 0)
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
||||||
@ -144,7 +143,7 @@ int main(int argc, char *argv[])
|
|||||||
if (config_parse(config) < 0)
|
if (config_parse(config) < 0)
|
||||||
break;
|
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)
|
if (!debug && log_init(logfile) < 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user