Make it possible to route messages to syslog

This commit is contained in:
2014-07-15 22:23:53 +02:00
parent 18cb2941f3
commit a2a979ea2e
2 changed files with 44 additions and 13 deletions

View File

@@ -1414,7 +1414,11 @@ main (int argc, char *argv[])
}
// TODO: daemonize
// TODO: syslog (if not running in debug mode)
if (!g_debug_mode)
{
openlog (PROGRAM_NAME, LOG_NDELAY | LOG_NOWAIT | LOG_PID, 0);
g_log_message_real = log_message_syslog;
}
ctx.polling = true;
while (ctx.polling)