Closed lmb closed 5 years ago
Would the recommendation be to use the journal
[1] package to log to instead of stdout?
I've not used that package myself, but it seems to do the correct thing to make this work. You can combine it with https://www.freedesktop.org/software/systemd/man/systemd.exec.html#$JOURNAL_STREAM to only log to journald when being run under systemd.
There is an unfortunate interaction between
tableflip
upgrades and restartingjournald
, see https://github.com/systemd/systemd/issues/13708The work around is to log to /run/systemd/journald/socket using SOCK_DGRAM. We should document this.