Score:1

systemd process stdout/stderr

np flag
esp

When I run the service manually, it logs something when it starts.

But I cannot find this log anywhere when it starts as systemd process.

journalctl -u <service> only shows the records about the service starting and stopping, not the actual service output.

I tried adding config to /etc/systemd/system/<service>.service file:

StandardOutput=append:/var/opt/<service>/stdout.log
StandardError=append:/var/opt/<service>/stderr.log

but it also didn't help - the files are created after daemon and service restart, but they are empty.

What am I missing?

Thank you for any suggestions, I am out of ideas.

Score:0
za flag

Use the following in the unit file

[Service]
StandardError=journal
StandardOutput=journal
StandardInput=null

See here for more: https://www.freedesktop.org/software/systemd/man/systemd.exec.html#StandardOutput=

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.