Search code examples
apacheloggingsystemd

apache2 log to journald


Is there an opportunity to write the log messages of apache (V2.4) to the journalctl/journald logs instead to log to a file?

(I've seen Apache2.5 will have a mod_journald to allow this task)


Solution

  • Could set a custom log in your httpd.conf.

    CustomLog "|/bin/logger -t access_log -p user.info" <log-formatters> 
    

    See the Apache docs for the formatting variables.

    http://httpd.apache.org/docs/current/mod/mod_log_config.html