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
|
||||
}
|
||||
|
||||
logmode = use_logfile?LOGMODE_FILE:LOGMODE_SYSLOG;
|
||||
if(do_detach && !use_syslog)
|
||||
if(use_logfile)
|
||||
logmode = LOGMODE_FILE;
|
||||
else if(use_syslog || do_detach)
|
||||
logmode = LOGMODE_SYSLOG;
|
||||
else
|
||||
logmode = LOGMODE_STDERR;
|
||||
|
||||
openlogger(identname, logmode);
|
||||
|
||||
logger(DEBUG_ALWAYS, LOG_NOTICE, "tincd %s (%s %s) starting, debug level %d",
|
||||
|
|
Loading…
Reference in a new issue