码迷,mamicode.com
首页 > 其他好文 > 详细

rsyslog的还本溯源

时间:2014-07-10 18:03:51      阅读:386      评论:0      收藏:0      [点我收藏+]

标签:facilities   security   different   message   option   

 


日志的分离
1)初学syslog
       void openlog(const char *ident, int option, int facility);
       void syslog(int priority, const char *format, ...);
       void closelog(void);
  facility
       The  facility argument is used to specify what type of program is logging
       the message.  This lets the configuration file specify that messages from
       different facilities will be handled differently.

       LOG_AUTH       security/authorization  messages (DEPRECATED Use LOG_AUTH-
                      PRIV instead)

       LOG_AUTHPRIV   security/authorization messages (private)

       LOG_CRON       clock daemon (cron and at)

       LOG_DAEMON     system daemons without separate facility value

       LOG_FTP        ftp daemon

       LOG_KERN       kernel messages (these can’t be generated from  user  pro-
                      cesses)

       LOG_LOCAL0 through LOG_LOCAL7
                      reserved for local use


2)进学rsyslog

3) 退学syslog-ng

Jul  9 11:25:40 localhost rsyslogd-3000: unknown facility name "test" [try http://www.rsyslog.com/e/3000 ]
Jul  9 11:25:40 localhost rsyslogd: the last error occured in /etc/rsyslog.conf, line 58:"test.*                                           /var/log/test"
Jul  9 11:25:40 localhost rsyslogd: warning: selector line without actions will be discarded
Jul  9 11:25:40 localhost rsyslogd-2124: CONFIG ERROR: could not interpret master config file ‘/etc/rsyslog.conf‘. [try http://www.rsyslog.com/e/2124 ]

 


1 unknown facility name "testprogram"

facility
       The  facility argument is used to specify what type of program is logging
       the message.  This lets the configuration file specify that messages from
       different facilities will be handled differently.

rsyslog的还本溯源,布布扣,bubuko.com

rsyslog的还本溯源

标签:facilities   security   different   message   option   

原文地址:http://5228690.blog.51cto.com/5218690/1436509

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!