logging: Log to systemd journal directly

While capturing stdout and stderr and automatically logging that to system
logging daemon provides basic information, a lot of information lost in the
process.

This change logs to systemd journal directly so that rich information such as
code file, code function, code line, etc, can be captured in a structured way.
To avoid double logging, discard stdout and stderr in the systemd unit file.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2018-12-23 17:18:13 -05:00
1 parent dc7bd96ed7
commit f36753fcb8
3 files changed
+15 -1

No files matched your search

+3 -1
View File
@@ -16,7 +16,7 @@
#
[Unit]
Description=Plinth Web Interface
Description=FreedomBox Service (Plinth)
Documentation=man:plinth(1)
After=network.target
@@ -26,6 +26,8 @@ Restart=on-failure
ExecReload=/bin/kill -HUP $MAINPID
User=plinth
Group=plinth
StandardOutput=null
StandardError=null
[Install]
WantedBy=multi-user.target