Updates for NetBSD.

This commit is contained in:
Jonathan Naylor 2020-10-05 13:22:45 +01:00
parent 52b49f0bf4
commit 5caf8c9e4b
4 changed files with 52 additions and 33 deletions

View file

@ -192,14 +192,11 @@ int CDAPNETGateway::run()
}
#endif
unsigned int displayLevel = m_conf.getLogDisplayLevel();
#if !defined(_WIN32) && !defined(_WIN64)
// In daemon mode there must be no output as STDOUT will be closed
if (m_daemon)
displayLevel = 0U;
ret = ::LogInitialise(m_daemon, m_conf.getLogFilePath(), m_conf.getLogFileRoot(), m_conf.getLogFileLevel(), m_conf.getLogDisplayLevel());
#else
ret = ::LogInitialise(false, m_conf.getLogFilePath(), m_conf.getLogFileRoot(), m_conf.getLogFileLevel(), m_conf.getLogDisplayLevel());
#endif
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;