It seems that this should be useful for debugging post-mortems. Also,
this ensures that the "current time is negative" log message appears in
syslog. Otherwise, it won't ever, because we log it before the vlog
client has a chance to configure its log levels.
fatal(0, "processing \"%s\": %s", arg, msg);
}
} else {
- vlog_set_levels(VLM_ANY_MODULE, VLF_CONSOLE, VLL_DBG);
+ vlog_set_levels(VLM_ANY_MODULE, VLF_ANY_FACILITY, VLL_DBG);
}
}
vlog_init(void)
{
time_t now;
+
openlog(program_name, LOG_NDELAY, LOG_DAEMON);
- vlog_set_levels(VLM_ANY_MODULE, VLF_CONSOLE, VLL_WARN);
+ vlog_set_levels(VLM_ANY_MODULE, VLF_ANY_FACILITY, VLL_WARN);
+
now = time(0);
if (now < 0) {
struct tm tm;