[rsyslog] Problem with Linux logger command and expression-based filter?

Bernard Fay bernard.fay at gmail.com
Fri Sep 17 20:32:45 CEST 2010


Hi,

Is it possible rsyslog expression-based filter cannot parse output form the
linux command logger?

I try to log events with /bin/logger to rsyslog, for example:  "logger -p
local3.info -t tag1 -- string to log".

In rsyslog.conf, if I use for example "local3.*    /var/log/tag1.log"  it
works fine.
When I try to use expression-based filter it does not work.  I would like to
use expression similar to the following:

if $syslogfacility-test == 'local3' and $programname == 'tag1'  then
/var/log/tag1.log

At first, I thought $programname could be my problem then I tried with the
following without success:
if $syslogfacility-test == 'local3'  then /var/log/tag1.log
if $syslogfacility == 3  then /var/log/tag1.log


Does someone has a trick to /bin/logger with expression-based filter?

Thanks,
Bernard



More information about the rsyslog mailing list