cod3fr3ak
April 18th, 2006, 11:32
Hi, everyone - I got a quick question.

I have a Apache 2 web server running, and I have managed to get log output over to syslog-ng by using the following directive:

ErrorLog syslog

Is there anyway to get output to log to a file log/error_log as well as to syslog - without having to write a script? I tried adding bother directives on the ErrorLog line and got the following error:

ErrorLog takes one argument, The filename of the error log

I am using Apache 2.2.x

cod3fr3ak
April 18th, 2006, 12:32
I am thinking I might just have to do something like:

ErrorLog "| logs/error_log | tee logger etc...."

or something along those lines. i'll need to play to find out what works

frisco
April 18th, 2006, 12:58
This works for me:
ErrorLog "| tee /usr/local/apache2/logs/error_log | /usr/bin/logger -t apache"

cod3fr3ak
April 18th, 2006, 13:43
Thanks frisco thats what i wound up doing. works like a champ.

cod3fr3ak
April 18th, 2006, 14:35
Ok done. Everything works. Be carefull of spaces, they cause weird things to happen. Thanks again Frisco.