You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Francis Galiegue <fg...@gmail.com> on 2006/05/17 17:22:00 UTC

Tomcat 5.0.x: AccessLogValve's "%B" pattern specifier shows -1 bytes??

Hello list,

In order to obtain more information from the AccessLogValve logger, I
use this parameter:

pattern="%a (%B bytes/%D msec) %s %r"

The trouble is that it shows pretty much all the time -1 as the number
of bytes delivered. It does send a positive number of bytes, however,
when the content delivered is a GIF file (the application uses
multiple domains and each domain has its logo). Weird.

Tomcat is version 5.0.27. Is this a known bug fixed by a more recent version?

While I'm at it, I have two more questions about the valve:

1. what if I DON'T want any log rotation from Tomcat itself but leave
it to logrotate? Will setting timeFormat to a void string do the
trick? I also don't see an option to take only a filename to log to,
only a prefix and suffix... Does a plain filename option exist that is
hidden even from the Tomcat docs on apache.org?
2. does the %t pattern specifier accept the Apache {} extension, such
as %{%Y%m%d,%H:%M:%S}t which I use for my Apache logs?

Thanks,
-- 
Francis Galiegue, fgaliegue@gmail.com, fg@one2team.com, fg6@wanadoo.fr
One2team - 12bis rue de la Pierre Levée, 75011 Paris - 0143381980
"When it comes to performance, weight is everything" - Tiff Needell

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


Re: Tomcat 5.0.x: AccessLogValve's "%B" pattern specifier shows -1 bytes??

Posted by Francis Galiegue <fg...@gmail.com>.
2006/5/17, Tim Funk <fu...@joedog.org>:
> Most likely - the response was a 3XX response. In which case - there is no
> body to send. (In particular look at 304 responses)
>

Well, nope, all are 200 responses (that's an AJP13 connector FWIW). I
do see the number of bytes sent by Apache, but then it uses
mod_deflate, so...

> 1) Setting timeFormat  to a format not friendly to SimpleDateFormat will
> probably yeild bad results.
>
> 2) No
>

Pity, really. I think these should be corrected in a future release.
It's hard to integrate it into my environment because of this :(


-- 
Francis Galiegue, fgaliegue@gmail.com, fg@one2team.com, fg6@wanadoo.fr
One2team - 12bis rue de la Pierre Levée, 75011 Paris - 0143381980
"When it comes to performance, weight is everything" - Tiff Needell

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


Re: Tomcat 5.0.x: AccessLogValve's "%B" pattern specifier shows -1 bytes??

Posted by Tim Funk <fu...@joedog.org>.
Most likely - the response was a 3XX response. In which case - there is no 
body to send. (In particular look at 304 responses)

1) Setting timeFormat  to a format not friendly to SimpleDateFormat will 
probably yeild bad results.

2) No

-Tim

Francis Galiegue wrote:

> Hello list,
> 
> In order to obtain more information from the AccessLogValve logger, I
> use this parameter:
> 
> pattern="%a (%B bytes/%D msec) %s %r"
> 
> The trouble is that it shows pretty much all the time -1 as the number
> of bytes delivered. It does send a positive number of bytes, however,
> when the content delivered is a GIF file (the application uses
> multiple domains and each domain has its logo). Weird.
> 
> Tomcat is version 5.0.27. Is this a known bug fixed by a more recent 
> version?
> 
> While I'm at it, I have two more questions about the valve:
> 
> 1. what if I DON'T want any log rotation from Tomcat itself but leave
> it to logrotate? Will setting timeFormat to a void string do the
> trick? I also don't see an option to take only a filename to log to,
> only a prefix and suffix... Does a plain filename option exist that is
> hidden even from the Tomcat docs on apache.org?
> 2. does the %t pattern specifier accept the Apache {} extension, such
> as %{%Y%m%d,%H:%M:%S}t which I use for my Apache logs?
> 
> Thanks,

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