I am running java apps via systemd:
[Unit]
Description=test service
[Service]
Type=simple
EnvironmentFile=/etc/sysconfig/testserver
WorkingDirectory=/opt/testserver
ExecStart=/usr/bin/java -jar /opt/testserver/test.jar
StandardOutput=syslog
StandardError=syslog
User=testserver
Group=testserver
SyslogIdentifier=testserver
[Install]
WantedBy=multi-user.target
I want to get stdout
in /opt/testserver/stdout.log
and stderr
in /opt/testserver/stderr.log
- any working options are acceptable (i.e. if possible to do through syslog
). If possible I want to avoid logging at least one of these in journald log.
Thanks...