rsyslog – redirect program logs to separate file

There is nothing complicated – just create new configuration file and restart service:

echo "if $programname == 'program_name' then /var/log/*rogram_name.log
& ~" > /etc/rsyslog.d/program_name.conf

service rsyslog restart

“& ~” – means, do not duplicate infomation in general syslog file

No comment yet
Leave a Reply

Your email address will not be published. Required fields are marked *