tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <>
Subject Re: Objections about formatting options to time stamp in access log
Date Mon, 08 Nov 2010 20:25:48 GMT
2010/11/8 Rainer Jung <>:
> 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.


> 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

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

> 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]


> Regards,
> Rainer
> [1]

Best regards,
Konstantin Kolinko

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message