concept syslogd in category linux

appears as: Syslogd
Linux in Action

This is an excerpt from Manning's book Linux in Action.

For decades, Linux logging has been managed by the syslogd daemon. Syslogd would collect the log messages that system processes and applications sent to the /dev/log pseudo device. Then it would direct the messages to appropriate plain text log files in the /var/log/ directory. Syslogd (figure 11.1) would know where to send the messages because each one includes headers containing metadata fields (including a timestamp, and the message origin and priority).

Figure 11.1. The flow of log data from sample sources through the syslogd daemon

In the wake of systemd’s relentless, world-conquering juggernaut, Linux logging is now also handled by journald. I say also because syslogd hasn’t gone anywhere, and you can still find most of its traditional log files in /var/log/. But you need to be aware that there’s a new sheriff in town whose (command line) name is journalctl.

With syslogd, the way messages are distributed is determined by the contents of the 50-default.conf file that lives in the /etc/rsyslog.d/ directory. This example from 50-default.conf shows how log messages marked as cron-related will be written to the cron.log file. In this case, the asterisk (*) tells syslogd to send entries with any priority level (as opposed to a single level like emerg or err):