现在,控制命名日志消息处置的 /etc/rsyslog.conf 的内容如下所示:
# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none;;kern.none /var/log/messages
将以下内容放在该部分的前面会正确地将“命名”消息写入 /var/log/named/named.log。
# Write named/bind messages to their own log file
:programname, isequal, "named" /var/log/named/named.log
问题是那些“命名”消息仍在写到 /var/log/messages 文件中。我将如何修改生成 /var/log/messages 的行以不写出“命名”消息?
注意:这是 RHEL/CentOS 6 附带的 rsyslog v5。
附录:下面接受的答案是
# Write named/bind messages to their own log file, then discard (tilde)
:programname, isequal, "named" /var/log/named/named.log
:programname, isequal, "named" ~
http://www.rsyslog.com/doc/rsyslog_conf_filter.html