You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Gregor Schneider <rc...@googlemail.com> on 2009/05/15 17:59:54 UTC

mod_jk: question regarding log-format

hi guys,

i'm wondering where - except from the source - i could find the
information of what the log-format-parameters actually mean.

example:

JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"

that's the default format-string, however, in the docs
(http://tomcat.apache.org/connectors-doc/reference/printer/apache.html)
i can't find what %a and %b mean.

I presume that %a tells me the ip-adress and that %b are the bytes,
however, i'd really like to read it up somewhere.

any clue?

tia

gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available
@ http://pgpkeys.pca.dfn.de:11371
@ http://pgp.mit.edu:11371/
skype:rc46fi

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


Re: mod_jk: question regarding log-format

Posted by Rainer Jung <ra...@kippdata.de>.
On 15.05.2009 18:18, Christopher Schultz wrote:
> Gregor,
> 
> On 5/15/2009 11:59 AM, Gregor Schneider wrote:
>> however, in the docs
>> (http://tomcat.apache.org/connectors-doc/reference/printer/apache.html)
>> i can't find what %a and %b mean.
> 
> Read more closely:
> 
> "
> The Tomcat Connector module date log format, using an extended strftime
> syntax.
> "
> 
> Just look at the man page for strftime to find out what all the
> %-thingys mean. If you don't have the man page handy, you can read one
> online: http://www.manpagez.com/man/3/strftime/
> 
>> I presume that %a tells me the ip-adress and that %b are the bytes,
>> however, i'd really like to read it up somewhere.
> 
> %a is documented to be the "abbreviated weekday name" while %b is
> documented to be the "abbreviated month name".
> 
> It's possible that the documentation is wrong and that Apache's log
> formatting options are in effect:
> 
> http://httpd.apache.org/docs/2.2/mod/mod_log_config.html#formats
> 
> I would look at your log file relative to the configured log format to
> see which one is being used. If the documentation is wrong, please
> notify Rainer or Mladen so they can correct it.

Chris is right, strftime plus proprietery %Q and %q is used. The docs
should be correct, except for the fact, that obviously not many users of
mod_jk will know about strftime().

Don't confuse JkLogStampFormat with JkRequestLogFormat. The first is
only for the time stamp formatting, the second adds access log like
lines to the jk log. The first ones uses a list of pattern characters
similar to strftime (strftime + Q + q), the second one an access log
like list of patterns.

I generally do not recommend to use JkRequestLogFormat, because you
should be better of by using the notes you can add to your original
access log. See "mod_log_config" on the same docs page.

Concerning JkLogStampFormat I'm not sure, whether you should use it.
Yes, if you have strict rules how your timestamps have to be configured.
But there is also one experience that gives an argument against using
it: we introduced the helpful logging of milliseconds to our default
timestamp format. If you had configured a timestamp format yourself, you
wouldn't have gotten the milliseconds, because then the newly introduced
letter for it wouldn't have been in your old pattern.

Regards,

Rainer

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


Re: mod_jk: question regarding log-format

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Gregor,

On 5/15/2009 11:59 AM, Gregor Schneider wrote:
> however, in the docs
> (http://tomcat.apache.org/connectors-doc/reference/printer/apache.html)
> i can't find what %a and %b mean.

Read more closely:

"
The Tomcat Connector module date log format, using an extended strftime
syntax.
"

Just look at the man page for strftime to find out what all the
%-thingys mean. If you don't have the man page handy, you can read one
online: http://www.manpagez.com/man/3/strftime/

> I presume that %a tells me the ip-adress and that %b are the bytes,
> however, i'd really like to read it up somewhere.

%a is documented to be the "abbreviated weekday name" while %b is
documented to be the "abbreviated month name".

It's possible that the documentation is wrong and that Apache's log
formatting options are in effect:

http://httpd.apache.org/docs/2.2/mod/mod_log_config.html#formats

I would look at your log file relative to the configured log format to
see which one is being used. If the documentation is wrong, please
notify Rainer or Mladen so they can correct it.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkoNlecACgkQ9CaO5/Lv0PBi/gCfaFlpQDuGqr4ngoQZggWbOGLC
oH4AoJtp1PFiFq1RFImzOilneU+xFZl2
=ft9e
-----END PGP SIGNATURE-----

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