星期二, 8月 12, 2008

Syslog

基本用法:
  • 不用openlog 也行,syslog 會自動呼叫,但用了後再message 會比較清楚。
  • openlog( "test", LOG_PID | LOG_CONS, LOG_USER );
  • syslog( LOG_USER | LOG_INFO , "[%d] "format, level, ## args);

LOG_EMERG system is unusable
LOG_ALERT action must be taken immediately
LOG_CRIT critical conditions
*LOG_ERR error conditions
*LOG_WARNING warning conditions
LOG_NOTICE normal, but significant, condition
*LOG_INFO informational message
*LOG_DEBUG debug-level message

Reference:

沒有留言: