[syslog-ng] exemple for logging with a regexp

Thierry B syslog-ng at bouhnik.biz
Sun Aug 7 11:14:57 CEST 2005


Hello,
I'd like to ask you a queqtion about syslog-ng.

I'd like to log for example, all mails from postfix in mail.log and for 
example all mails from courier imap to /var/log/imapd.

I already manage to do that with syslog using facility like that:

local0.*			-/var/log/imapd.log
mail.*				-/var/log/mail.log

But I'd like to add a regexp, so he didn't log all things.
For example, for postfix, I'd like to add a blank line each time he find 
a line called "disconnect" or "removed".
Is it possible to do that easyly with syslog-ng?
Or I can also do that with my actual syslog?

Because if I pass to syslog-ng instead of syslog, I'd like to keep my 
syslog config, except for those logs, that I want to filter with regexp.

Thanks :-)



More information about the syslog-ng mailing list