mod_log_config doesn't allow to use syslog facility like this: CustomLog syslog:local4 (like it's possible with ErroLog).
Created attachment 30145 [details] Proposed trivial patch that solves the ticket The patch mimics the same syntax which is used for ErrorLog directive by Apache itself (see server/log.c). After patch applied Apache log configuration looks like that: httpd.conf lines: ErrorLog syslog:local3 CustomLog syslog:local4 syslog.conf lines related to Apache log files: local4.info /opt/home/data/logs/access.log local3.info /opt/home/data/logs/error.log It was tested under Apache 2.2.24
Now we can send Apache access logs to remote syslog host (via UDP port 514). /etc/hosts line related to remote syslog host: 192.168.3.202 apache_virtualhost_logs syslog.conf lines related to Apache log files: local4.info @apache_virtualhost_logs local3.info @apache_virtualhost_logs
Comment on attachment 30145 [details] Proposed trivial patch that solves the ticket Would it be possible to submit this patch as a unified diff (diff -u) against the trunk version of the server? This looks very useful.
Created attachment 30235 [details] Proposed trivial mod_log_config patch against current trunk You can find here a patch against trunk version (29-04-2013).
Requested unified diff was delivered.
Comment on attachment 30235 [details] Proposed trivial mod_log_config patch against current trunk Unfortunately this patch changes the public API for the ap_log_writer_init() function, which would make it impossible to backport this to httpd v2.4. Is there a way to handle the syslog mask without passing it in externally? In theory, the syslog mask should map to the LogLevel in some fashion, otherwise httpd would be wasting cycles generating log lines, only for syslog to ignore them.
Hi, Any news regarding this useful feature ? Many thanks ! Ben
Just checking in on this.