mirror of
https://github.com/g4klx/DAPNETGateway.git
synced 2026-08-26 12:32:45 -04:00
Lock DisplayLevel to 0 when daemonized
This commit is contained in:
parent
a6836690e2
commit
7066b44eaa
1 changed files with 6 additions and 1 deletions
|
|
@ -185,7 +185,12 @@ int CDAPNETGateway::run()
|
|||
}
|
||||
#endif
|
||||
|
||||
ret = ::LogInitialise(m_conf.getLogFilePath(), m_conf.getLogFileRoot(), m_conf.getLogFileLevel(), m_conf.getLogDisplayLevel());
|
||||
unsigned int DisplayLevel = m_conf.getLogDisplayLevel();
|
||||
// In daemon mode there must be no output as STDOUT will be closed
|
||||
if (m_daemon)
|
||||
DisplayLevel = 0;
|
||||
|
||||
ret = ::LogInitialise(m_conf.getLogFilePath(), m_conf.getLogFileRoot(), m_conf.getLogFileLevel(), DisplayLevel);
|
||||
if (!ret) {
|
||||
::fprintf(stderr, "DAPNETGateway: unable to open the log file\n");
|
||||
return 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue