In myapp.service, I have :
When I do :
$ journalctl -e -u myapp
I can see each line of log contains "myapp[PID]".
I've tried to set up /etc/rsyslog.d/myapp.conf with :
if $msg contains 'myapp' then /opt/myapp/log/myapp.log & stop
if $programname == 'myapp' then /opt/myapp/log/myapp.log & stop
Each time checking syntax with "rsyslogd -N1" and restarting rsyslogd.
But log message is not routed, nothing is written in myapp.log
Could it be because of my rsyslog version (8.16) ? or some permission issue ? I've tried to touch the log file but it didn't work.