mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-04-29 10:10:19 +00:00
Helps: #664. Currently, logs are written to disk twice, once by journald and once by rsyslog. rsyslog may log to multiple locations depending on the type of the log. To reduce disk I/O, disable rsyslog and rely solely on systemd journal. Place the code in config module as there is no better place for it currently without creating a new module. Can be sorted later. The following files under /var/log/ are no longer populated on FreedomBox. They will be rotated away over a few days. Use journalctl instead to view the messages: - syslog - messages* - auth.log* - debug* - daemon.log - kern.log - lpr.log - mail.log - mail.info - mail.warn - mail.err - user.log Tests performed: - On a machine with rsyslog running, run ./setup.py install and start FreedomBox service. This triggers the config app's setup. rsyslog is disabled and masked. systemd-journald is restarted. - Even when rsyslog is unmaked and enabled manually, systemd journald does not forward message to syslog anymore. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Veiko Aasa <veiko17@disroot.org>
13 lines
750 B
Plaintext
13 lines
750 B
Plaintext
[Journal]
|
|
# Upstream systemd project disables forwarding to syslog by default as it is
|
|
# only needed by syslog daemons that don't get their feed from systemd journal.
|
|
# See:
|
|
# https://www.freedesktop.org/software/systemd/man/journald.conf.html#ForwardToSyslog=
|
|
# . Debian re-enables this by default due to support lacking in some syslog
|
|
# daemons in its repository. See:
|
|
# https://salsa.debian.org/systemd-team/systemd/-/blob/c39ab3efdc9c1b69f333c112112a68fb712cee27/debian/patches/debian/Re-enable-journal-forwarding-to-syslog.patch
|
|
# . In FreedomBox, rsyslog and other syslog daemons are not necessary and are
|
|
# burden on disk I/O. All the necessary log data can be obtained from systemd
|
|
# journal. Disable forwarding to syslog.
|
|
ForwardToSyslog=no
|