[HOW TO] set application log to rsyslog on Ubuntu server

Depending on your application, also your purpose, you want to direct the log to fixed log path. So, if you are using rsyslog as a syslog service on Ubuntu, please follow this article. I am using trigger to do this. Go to log path root@sta-tn:/etc/rsyslog.d# then write a sub-rsyslog configuration. root@sta-tn:/etc/rsyslog.d# vim 10-sta.conf  if $programname == 'STA'  then {   /var/log/sta.log ...