How can I discard multiple messages at once using rsyslog? This doesn't work and I'm unable to find a working example:
# Do not log any keepass and chmomium messages
if $programname == 'chromium.desktop' then /dev/null
if $programname == 'keepass2.desktop' then /dev/null
& stop
The solution below works, but shows an error when checking with rsyslogd -N1 -f <config_file>
rsyslogd: version 8.4.2, config validation run (level 1), master config /etc/rsyslog.d/00-discard.conf
rsyslogd: CONFIG ERROR: there are no active actions configured. Inputs will run, but no output whatsoever is created. [try http://www.rsyslog.com/e/2103 ]
rsyslogd: run failed with error -2103 (see rsyslog.h or try http://www.rsyslog.com/e/2103 to learn what that number means)