For older setups the most relevant setting is the
Storage=
one, as that (indirectly) controls if the journald is written to disk. Here, the default of
auto
means that it will be made persistent if the
/var/log/journal
directory exists. This is also what changed in newer installations, the
journald.conf
stayed the same, but the mentioned directory is now explicitly created on installation.
So, if that doesn't exist yet on an installation of yours, you can simply
mkdir /var/log/journal
it and then restart the service:
systemctl restart systemd-journald.service
For other settings check out the journald.conf man page:
https://manpages.debian.org/bullseye/systemd/journald.conf.5.en.html#OPTIONS
Most have a quite telling name, and it boils down to basic space usage (runtime and system (persistent)), rate limiting, filtering.
There's no log rotation snippet, as journald manages that itself.
While you also can configure retention as a time span, most of the time space is the limiting factor and with rate limiting, compression and the binary format one has a good chance that there's a long time of logs preserved even if a service goes completely bonkers and spams the log.
You might want to clean up the old log files (and their rotations). Not sure if I'd go as far as recommend doing that, but it might make sense to avoid that admins look at a leftover old, e.g., syslog file without noticing - plus they take up space, not much most of the time but still.
By default,
rsyslog
is configured to split (or copy!) incoming log message to different (or multiple) files.
For example, this snippet from
/etc/rsyslog.conf
is the most relevant base set that rsyslog will use:
Code:
#
# First some standard log files. Log by facility.
#
auth,authpriv.* /var/log/auth.log
*.*;auth,authpriv.none -/var/log/syslog
#cron.* /var/log/cron.log
daemon.* -/var/log/daemon.log
kern.* -/var/log/kern.log
lpr.* -/var/log/lpr.log
mail.* -/var/log/mail.log
user.* -/var/log/user.log
So that'd be the base set on files (plus their log rotated variants) that one might want to clean up.
Packages might ship their own extra rules in
/etc/rsyslog.d/*.conf
, but IME not a lot of packages do so.