log level should be configured in config file

This commit is contained in:
lxsang
2021-10-08 22:33:16 +02:00
parent e7ec929709
commit e9cd1addf7
4 changed files with 15 additions and 6 deletions

View File

@ -339,7 +339,14 @@ int main(int argc, char *argv[])
config_t *conf = config();
// start syslog
setlogmask(LOG_UPTO(LOG_NOTICE));
if(conf->debug_enable == 1)
{
setlogmask(LOG_UPTO(LOG_NOTICE));
}
else
{
setlogmask(LOG_UPTO(LOG_ERR));
}
openlog(SERVER_NAME, LOG_CONS | LOG_PID | LOG_NDELAY, LOG_DAEMON);
#ifdef USE_OPENSSL