1.如何将 syslog在打印到 message 时,同时打印到终端上,设置标记
LOG_PERROR 即可。
man openlog
LOG_PERROR (Not in POSIX.1-2001.) Print to stderr as well.
-
openlog("syslog_test", LOG_PID | LOG_NDELAY | LOG_CONS | LOG_PERROR, LOG_LOCAL4);
-
syslog(LOG_ALERT, "MYTEST->Exiting due to unexpected forced shutdown");
阅读(1067) | 评论(0) | 转发(0) |