The following reply was made to PR mod_log-any/1050; it has been noted by GNATS.
From: David Birnbaum <[EMAIL PROTECTED]> To: Marc Slemko <[EMAIL PROTECTED]> Subject: Re: mod_log-any/1050: Logging of virtual server to error_log as well Date: Mon, 25 Aug 1997 01:28:19 -0400 (EDT) On Sun, 24 Aug 1997, Marc Slemko wrote: > On Mon, 25 Aug 1997, David Birnbaum wrote: > > > If you have the ErrorLog in a VirtualHost directive, then error message > > from that particular virtual server (including STDERR, which is waht I'm > > really interested in) go to that log. I guess all that I really would > > want is some way to prepend the name of the virtual host to any of those > > error strings. I don't understand how you bind a particular error message > > to a given output, but since it is done somewhere in the VirtualHost code, > > it seems as though that same mechanism could be used. > > Not really. All that is done is a different file descriptor is for the > log. The CGI is run with stderr pointing to that file. Apache isn't in > the loop any more. All that can be done easily is mess with what file > descriptor gets the output, we can't edit it in-stream. Hmmm...I see. That makes sense; too bad there's not another way to get around it. I suppose one could attach STDERR of the CGI process to a pipe on the httpd process and read it in that way to do the formatting, but that's a bit of code to put together, not to mention the possibility of deadlock to account for, since forking a child to handle it would be somewhat silly. Perhaps I'll dust off what's left of my C that hasn't been completely PERL'ized and see if I can make it do that.... Thanks for the information, as well as a great server, David.
