I'd like to redirect all messages from dhcpd to their own log file, rather than having them appear in /var/log/messages.

When I put the following lines in /etc/syslog.conf:

!dhcpd
*.*                     /var/log/dhcpd.log

The messages are redirected to dhcpd.log, BUT they're also still going to /var/log/messages. What's the syntax to exclude them from /var/log/messages?

link|improve this question
feedback

1 Answer

up vote 1 down vote accepted

`!-prog' specification will match any message but the ones from that program:

!-dhcpd
*.err;kern.*;auth.notice;authpriv.none;mail.crit         /dev/console
*.info;mail.none;authpriv.none       /var/log/messages
......

!dhcpd
*.*                     /var/log/dhcpd.log
link|improve this answer
That did it. Thanks! – Dave Feb 4 '11 at 19:31
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.