On Tue, 29 Mar 2011, lanas wrote:

Hello,

 What I would like to do is to have a special log file for one
application.  I would like to have all logging from that app go to that
file and nowhere else. So I do:

if $programname == 'applogTest' then /var/log/applogtest.log

 This works, but messages are also sent to the main system log file.
How can log messages be *only* sent to this applogtest.log file ?

do

if $programname == 'applogTest' then /var/log/applogtest.log
& ~

the & says to do the same test as the prior line

the ~ says to throw away this log message and don't do anything else with it.

David Lang
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com

Reply via email to