linux,

Where to find stored syslog messages

Mar 04, 2022 · 1 min read · Post a comment

When it comes to Syslog messages in Linux it’s important to know that they are handled by two services:

  • systemd-journald daemon: Gathers all the messages from the kernel including boot processes, error of daemons, standard outputs, and also forward some messages to Rsyslog service.
  • rsyslog service: Sorting messages by priority and type and providing logs in the /var/log directories. Here I’m going to list all types of syslog messages and where you can find them.

Prerequisites

  • Linux bash environment

Subdirectories stored by the Syslog Messages

There are different subdirectories stored by the syslog messages depending on what kind of messages and information you need:

  • /var/log/messages: Contains all kind of syslog messages except the below ones.
  • /var/log/secure: Security and auth related messages and errors only.
  • /var/log/maillog: Provides mail server based messages and errors.
  • /var/log/cron: Stores logs messages and errors for scheduled cron jobs which are periodically executed.
  • /var/log/boot.log: All kinds of logs related to the system startup.

Conclusion

If you have any specific concerns or questions for all these different kinds of syslog messages don’t hesitate to put a comment below. On a side note, follow our official channel on Telegram.