On Fri, Jun 27, 2003 at 07:21:09PM -0700, Andrew Ho wrote:
> It would be great to have a configuration directive to separate out stderr
> messages from messages generated by Apache modules. It's often desirable
> to parse error logs to generate statistics on 404s, etc. and stderr output
> makes this more difficult.

I agree with Joshua that the access log is a much better place from which
to generate statistics.

> This would also help the case where you have 100 VirtualHosts, and you
> want to use something like ErrorLogsWithVhost to use a single error_log.
> You'd want to redirect stderr to a different place for each VirtualHost
> (or else you couldn't see which VirtualHost stderr output came from).

I'm guessing that you are referring to stderr from CGI scripts, which
can be voluminous.

I believe that Apache 2.x reads in CGI stderr and formats it consistently
into the ErrorLog, so if ErrorLogsWithVhost or some facimile thereof
eventually makes it into Apache 2.x, then you'll be able to robustly
split out a single error log, including CGI stderr output.

This is not the case in Apache 1.3 where CGI stderr goes directly to the
error log (on unix-like systems because of file descriptor inheritance).
Thinking aloud, it might be an interesting project (wish I had time) to
create a directive along the lines of ScriptLog that would work with
mod_cgi.  After mod_cgi fork'ed, the child could open a vhost-specific
CGI stderr log and then could dup it to stderr before exec'ing the CGI.
This might even work well for mass vhosting.

Cheers,
Glenn

Reply via email to