Knowledge Base

Preserving for the future: Shell scripts, AoC, and more

How to get useful system logs on CentOS 8

Beware the short lifespan of CentOS 8. I haven't migrated to one of the replacements yet, so go investigate for me and tell me what you think of these: Rocky Linux AlmaLinux In the mean time, my lone CentOS 8 system needs real logging. Journald doesn't seem to store logs, because it is poorly written. Or given poor defaults, and what's the difference? So in file /etc/systemd/journald.conf go set variable:

[Journal]
Storage=persistent

But to get real logging, you need to go configure rsyslog.

sudo dnf install rsyslog

And that has sane defaults that actually log messages to disk.

References

Weblinks

  1. How To Use Journalctl to View and Manipulate Systemd Logs | DigitalOcean
  2. How to Configure Rsyslog Server in CentOS 8 / RHEL 8

Comments