0

How do I modify /etc/syslog.conf so that I would send all messages with "warn" priority, except those of type "mail" and "lpr" to /var/log/mywarnings. I also have to send all messages of type "mail", except those with priority "err" to /var/log/mymail.

1 Answer 1

2

man rsyslog.conf will go a long way.

But to get you started:

*.=warn;mail.none;lpr.none    /var/log/mywarnings

This basically says all messages equal to level warn (*.warn would be warning or higher), but then exclude mail and lpr by asking for .none, to go to /var/log/mywarnings.

To exclude a priority and higher, use !. To exclude just one, it's !=. So:

mail.*;mail.!=err    /var/log/mymail
1
  • it was with mail.* in front. Thank you very much for the answer:)
    – johnny
    Dec 7, 2011 at 19:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .