tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <rainer.j...@kippdata.de>
Subject Re: Access-log ordering
Date Fri, 19 Apr 2013 18:18:09 GMT
On 18.04.2013 23:58, Christopher Schultz wrote:

Mark is of course right. Adding some info here concerning your log format:

> We are using the following format string:
> "%a %t &quot;%r&quot; %s %D"

> The value of "%t" is the interesting one, of course, but it's
> resolution is only in seconds, and we are seeing an access log file
> like this:
> 
> 127.0.0.1 [18/Apr/2013:16:19:08 -0400] "POST /request/B HTTP/1.1" 200 108
> 127.0.0.1 [18/Apr/2013:16:19:08 -0400] "POST /request/A HTTP/1.1" 200 263

In TC 7 you can log start time and end time and also milliseconds:

%{begin}t %{begin:msec_frac}t %{end}t %{end:msec_frac}t

or (maybe a bit slower but formatted more nicely)

%{begin:dd/MMM/yyyy:HH:mm:ss.SSS Z}t %{end:dd/MMM/yyyy:HH:mm:ss.SSS Z}t

The %{begin:msec}t and %{end:msec}t can also be useful. They are
milliseconds since the epoch, so not nicely readable for humans, but
nice for doing calculations.

AFAIR times are consistent if you use multiple formatting tokens, to te
time for begin and end is only taken once and then the various formats
use those two time values consistently.

The "end:" prefix is the default, so it can be ommitted.

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message