4
votes

This question is about HTTPD (Apache) 2.? on centOS and modperl 1.7+

When I use the apache directive ErrorLog logs/error_log, my perl warnings show up in the error_log file. When I change this to ErrorLog syslog:local1, no perl warnings show up in the syslog target. My question is, how do I remedy this??

(syslog reads: local1.* /var/log/httpd_error)

Current Apache docs say this

A very wide variety of different messages can appear in the error log. Most look similar to the example above. The error log will also contain debugging output from CGI scripts. Any information written to stderr by a CGI script will be copied directly to the error log.

Old Apache (1.3) docs talk about something called HookStderr and stderr being sent to /dev/null. I tried using this and configtest fails.

Has anyone done this?

1
For the apache config, Serverfault is probably more appropriate. If you want to have your perl script directly log to syslog, see Sys::Syslog (or log4perl, or log dispatch, etc.)derobert

1 Answers