How does a day in a life of an Apache log message in modern systemd
based Linux system look like? I would expect it to be something like that:
- Apache daemon writes a log message using
syslog(3)
- this log message is written to
/run/systemd/journal/dev-log
systemd-journald
reads the log message from
/run/systemd/journal/dev-log
systemd-journald
writes it to/run/systemd/journal/syslog
rsyslogd
orsyslog-ng
listen on/run/systemd/journal/syslog
,
get the message and then process it based on their configuration
Am I missing something? Is it possible that Apache logs(for example access log messages) directly to files, bypassing the whole logging system altogether?
Best Answer
It depends on the Apache configuration. As documented in mod_log_config,
CustomLog
can be used to send logs directly a file or pipe them to a command. That command could in turn pipe the contents on to asyslog
daemon or even into thesystemd journal
.The not-yet-released Apache 2.5 allows logging directly to
systemd
viamod_journald
.