I'm trying to write Apache 2.4 errors to an error log and sending them to a Graylog2 server using a Python script. Looking at examples such as http://www.fnal.gov/docs/products/apache/syslog_logs_notes.html and http://zindilis.com/docs/apache-logs-to-remote-syslog.html. The examples show I should use tee, for example:
ErrorLog "| tee -a /var/log/httpd/error_log | nc -u -j syslog.example.com 514"
I'm doing the following:
ErrorLog "| /usr/bin/tee -a /var/log/httpd/domains/test.error.log | /usr/bin/python /opt/apache2gelf/test.py"
The messages are written to the logs but the python script is not executed. The Python script has 755 permissions. What am I missing here?