Fix the case where we detach and use --logfile.
This commit is contained in:
parent
04fc19112d
commit
15ad628f06
1 changed files with 6 additions and 2 deletions
|
|
@ -213,9 +213,13 @@ bool detach(void) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
logmode = use_logfile?LOGMODE_FILE:LOGMODE_SYSLOG;
|
if(use_logfile)
|
||||||
if(do_detach && !use_syslog)
|
logmode = LOGMODE_FILE;
|
||||||
|
else if(use_syslog || do_detach)
|
||||||
|
logmode = LOGMODE_SYSLOG;
|
||||||
|
else
|
||||||
logmode = LOGMODE_STDERR;
|
logmode = LOGMODE_STDERR;
|
||||||
|
|
||||||
openlogger(identname, logmode);
|
openlogger(identname, logmode);
|
||||||
|
|
||||||
logger(DEBUG_ALWAYS, LOG_NOTICE, "tincd %s (%s %s) starting, debug level %d",
|
logger(DEBUG_ALWAYS, LOG_NOTICE, "tincd %s (%s %s) starting, debug level %d",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue