You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Sergio Junqueira <sj...@yahoo.com> on 2010/09/11 01:25:10 UTC

Apache logging

I have a suggestion for the developers of Apache related to mod_log_config or 
mod_log_forensics:

1) To allow mod_log_config to write the log file with a first log entry with 
basic information about the request before it's processed further (that is, 
after receiving the headers). The second log entry (the current logging format) 
would be written after the request processing. A "log ID", just like the 
"forensic ID", should be available on both entries.

2)- Or to allow mod_log_forensic to be configured not to write all headers to 
disk. For instance, we should be able to configure it just like we do with 
LogFormat on mod_log_config. Or at least allow us to choose to write just the 
1st request line, without all the headers.

Thanks.



      

Re: Apache logging

Posted by Stefan Fritsch <sf...@sfritsch.de>.
On Fri, 10 Sep 2010, Sergio Junqueira wrote:

> I have a suggestion for the developers of Apache related to mod_log_config or
> mod_log_forensics:
>
> 1) To allow mod_log_config to write the log file with a first log entry with
> basic information about the request before it's processed further (that is,
> after receiving the headers). The second log entry (the current logging format)
> would be written after the request processing. A "log ID", just like the
> "forensic ID", should be available on both entries.
>
> 2)- Or to allow mod_log_forensic to be configured not to write all headers to
> disk. For instance, we should be able to configure it just like we do with
> LogFormat on mod_log_config. Or at least allow us to choose to write just the
> 1st request line, without all the headers.

I think 2) would be a reasonable feature request for mod_log_forensic and 
would be easy to implement. However, I am interested about your actual use 
case. Do you need the first entry to determine which request may have 
caused httpd to crash or is there a different reason?


If you are generally interested in better logging in httpd, you may want 
to read and possibly comment about some new features in 2.3/2.4:

http://httpd.apache.org/docs/trunk/mod/core.html#errorlogformat
http://httpd.apache.org/docs/trunk/mod/core.html#loglevel

Cheers,
Stefan