Solved Exclude from syslog

Hi,

I want to log snmpd(8) messages only to /var/log/snmpd.

Code:
[helmut@BSDHelmut ~]$ cat /etc/syslog.d/30-daemon.conf
daemon.*                                        /var/log/daemon.log
[helmut@BSDHelmut ~]$

Code:
[helmut@BSDHelmut ~]$ cat /etc/syslog.d/40-snmpd.conf
!snmpd
*.*                     /var/log/snmpd.log
[helmut@BSDHelmut ~]$

What do I need to specify that SNMPD messages won't also get logged to daemon.log?

Thank you!
 
Can I stop processing snmpd somehow? Something like

[helmut@BSDHelmut ~]$ cat /etc/syslog.d/00-all.conf
*.* /var/log/all.log
!-snmpd
[helmut@BSDHelmut ~]$


which does not work as snmpd still gets logged via /etc/syslog.d/40-snmpd.conf.

Edit: I assume I missed the the "blocks". If I have empty lines in the config a new block starts making the "!-snmpd" obsolete.
 
Back
Top