rsyslog config conditions filtering ":programname,startswith" code example
Example 1: rsyslog config conditions filtering ":programname,startswith"
Example 2: rsyslog config conditions filtering ":programname,startswith"
if $syslogfacility-text == 'local6' and $programname startswith 'test' then ?Dyn_File
& ~
if $programname == 'blue' then ?Dyn_File
& ~
Example 3: rsyslog config conditions filtering ":programname,startswith"
template (name="Dyn_File" type="string" string="/var/log/app/%programname%.log")