httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Dabbs" <>
Subject RE: Apache logging
Date Mon, 13 Sep 2010 05:18:17 GMT

I'm not sure it is related, but I'd like to know the most efficient way 
to debug error_log entries such as the following. In the first case, I 
presume that the referrer was absent or was unable to be read.
Ideally a "conditional" forensics log  (i.e. only on error response codes) 
would probably do it, but I don't think that's possible, right?



[Mon Sep 13 04:12:25 2010] [error] [client] request failed:
error reading the headers

[Mon Sep 13 04:25:22 2010] [error] [client] request failed:
error reading the headers, referer:

From: Sergio Junqueira  
Sent: Sunday, September 12, 2010 8:35 PM
Subject: Re: Apache logging

>Do you need the first entry to determine which request may have caused
httpd to crash or is there a different reason?

Mod_log_forensics writes the log record as soon as it is received.
Mod_log_config writes the log record after the response is available. I
don´t want to miss information about any request. Its important to identify
all incoming requests, no matter if they fail or succeed.

I would like to trace them having a small log record from the incoming
requests. Useful to determine which request may have caused httpd to crash,
as you mentioned, and to have 100% guarantee that all incoming requests were
logged before Apache started processing it.

Does mod_log_config always writes a log record for all incoming requests, no
matter where or when they failed in the processing chain? If this is the
case, mod_log_config provides the %D format to determine when
the incoming request was received and it seems the current mod_log_config
record would provide the information I need.


Sent: Sun, September 12, 2010 7:18:07 AM
Subject: Re: Apache logging

On Fri, 10 Sep 2010, Sergio Junqueira wrote:

> I have a suggestion for the developers of Apache related to mod_log_config
> mod_log_forensics:
> 1) To allow mod_log_config to write the log file with a first log entry
> basic information about the request before it's processed further (that
> after receiving the headers). The second log entry (the current logging
> 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
> 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
> 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:


View raw message