2010/11/8 Rainer Jung <rainer.j...@kippdata.de>:
> A typical annoyance when combining Apache web server and Tomcat is the
> difference in access log timestamp. Apache logs the beginning of the
> request, Tomcat logs the end of the request.
>

According to the HTTPD docs [2], this changed between HTTPD 1.3 and 2.
1.3 logs the time when the request processing finished, 2+ logs when it started.

[2] http://httpd.apache.org/docs/1.3/logs.html

> I added a feature to Apache trunk (will become 2.4) to make it configurable
> for Apache, which time stamp to choose ([1]). Furthermore the Apache web
> server allows to choose the format, in which the time stamp is being logged
> as something different than just "Common Log Format". This is all configured
> by an appropriate "format" in %{format}t.
>
> Any a priori objections about porting the same functionality to Tomcat
> trunk?
>

I thought about it already. I would like this feature.

My current idea with implementation is that the timestamp when request
processing started can be placed in a field in the request. Such
solution will be compatible with the recently added AccessLog
interface.

There might be a caveat with caching of formatted timestamp strings in
the access log valve implementations. What happens with async
requests?

> Of course due to latency between Apache and Tomcat and due to different
> timeouts, even when using the same time stamp (begin or end of request) in
> both products, the timestamps will not always match exactly. But at the
> moment matching the entries is much harder, than it could be.
>

If one needs to match them it would be better to do so by certain id,
not by a timestamp.

Something like %{forensic-id}n  [3]

[3] http://httpd.apache.org/docs/current/mod/mod_log_forensic.html

> Regards,
>
> Rainer
>
> [1] http://httpd.apache.org/docs/trunk/mod/mod_log_config.html#formats
>

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to