Redirecting apache access_log and error_log to the systemd journal

Harald Hoyer November 07, 2013 #apache #fedora #systemd #journal #httpd

To redirect all apache messages to syslog, which will then appear in the systemd journal modify your httpd.conf:

CustomLog "|/bin/logger -t access_log -p user.info" "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""``
ErrorLog syslog:user

Of course it would be much nicer, if apache actually could use the journal directly.

[Edit]: Apparently with apache 2.5, there will be a mod_journald :-)