Scratch of the day - exclude logging to /var/log/messages

After telling dhcpd to log messages to local7 of syslogd, "uid lease" messages are still being log in /var/log/messages. This is because by default, syslogd logs "notice" level and above to /var/log/messages.

If you don't wanna see these messages in /var/log/messages, which it has already log to /var/log/dhcpd.log, include the log level "none" that tells syslogd logs to /var/log/messages. This assumed that dhcpd is configured to use log facility "local7" in it's config file, that output all messages to /var/log/dhcpd.log.

Example :
(in /etc/syslog.conf)
----- snip -----
*.notice;authpriv.none;kern.debug;lpr.info;mail.crit;news.err;local7.none   /var/log/messages
----- snip ----

Reload syslogd and monitor /var/log/messages & /var/log/dhcpd.log :

/etc/rc.d/syslogd reload

Namaste !!!

No comments: