I was trying to set up a specific Rsyslog configuration file to catch all incoming kernel messages of a few types. For example, I want to dump all logs containing "example message 1" and "example message 2" into a custom log.
For example, this rule in rsyslog.conf works.
:msg, contains, "example message 1" /var/log/custom-log
:msg, contains, "example message 2" /var/log/custom-log
However, is there a way to make it any cleaner? For example, using "example message 1"|"example message 2"
as a value instead, or something equivalent. The rsyslog documentation is a tad cryptic about this.
Thanks!