Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 2 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
share|improve this answer
    
That did it. Thanks! –  Dave Feb 4 '11 at 19:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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