I am using rsyslog to handle the logs that my program creates. I have used a template to customize the logs format. My doubts are:

  • If I create a template, every program that use that rsyslog.conf file, will store its logs using that template?

  • How can I create 2 templates so that different program functions store their logs in different format?

1 Answer 1


You can split the rsyslog logs based on their program names.

Create a new file, /etc/rsyslog.d/01-programone.conf with these lines,

if $programname == 'programone' then /var/log/programone.log

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .