daemon: Add --log-target=journal to pulseaudio.service

When running under systemd from its `.service` file, the daemon is
started with `--daemonize=no`. This means that the default logging
target is `stderr` (see the documentation for `--log-target` in
`pulse-daemon.conf(5)`). That works fine, but results in all the
structured logging data from the `pa_log()` calls being thrown away and
not making it into the journal.

In order to preserve structured logging data, and hence make the
messages in the journal a little more useful (for example, allowing the
user to filter by message priority), explicitly pass
`--log-target=journal` in the `.service` file. This should always be
appropriate because the journal should always be used with systemd.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
Philip Withnall 2020-03-11 10:46:04 +00:00
parent 94e479b261
commit 60531aef82

View file

@ -17,7 +17,7 @@ Requires=pulseaudio.socket
ConditionUser=!root
[Service]
ExecStart=@PA_BINARY@ --daemonize=no
ExecStart=@PA_BINARY@ --daemonize=no --log-target=journal
LockPersonality=yes
MemoryDenyWriteExecute=yes
NoNewPrivileges=yes