--- On Thu, 2/19/09, Christopher Schultz <ch...@christopherschultz.net> wrote:

> From: Christopher Schultz <ch...@christopherschultz.net>
> Subject: Re: convert date from Feb 18, 2009 8:56:27 PM to 2009-02-18 20:56:27
> To: "Tomcat Users List" <users@tomcat.apache.org>
> Received: Thursday, February 19, 2009, 1:41 PM
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> PoWah,
> 
> On 2/19/2009 11:51 AM, PoWah Wong wrote:
> > I tried the following two values for the file
> > /usr/tomcat/conf/logging.properties, restarting tomcat
> does not fix the date format problem.
> 
> > 1.
> > ...
> > java.util.logging.ConsoleHandler.formatter =
> java.util.logging.SimpleFormatter
> > java.util.logging.ConsoleHandler.SimpleDateFormat =
> "yyyy-MM-dd HH:mm:ss"
> > ...
> 
> > 2.
> > ...
> > java.util.logging.ConsoleHandler.formatter =
> java.util.logging.SimpleFormatter
> > java.util.logging.ConsoleHandler.SimpleDateFormat =
> yyyy-MM-dd HH:mm:ss
> 
> As Martin points out, "SimpleDateFormat" is not
> an attribute of
> java.util.logging.ConsoleHandler. His comments about
> commons-logging are
> confusing, though, because the two logging systems are not
> compatible.
> 
> I believe if you want to change the date format of those
> logging
> statements using Java's logging system, you'll have
> to implement your
> own Formatter.
> 
> See the very last section of this page for
> "formatter":
> http://tomcat.apache.org/tomcat-5.5-doc/logging.html
> 
> - -chris
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla -
> http://enigmail.mozdev.org
> 
> iEYEARECAAYFAkmdp8gACgkQ9CaO5/Lv0PC1OwCfevOkFLtdAhxXrZ4rUqaFqCqn
> brAAnAg0QyPZm+seYUbzS1Q8WCQ6dufM
> =gdBq
> -----END PGP SIGNATURE-----
> 
How to implement my own Formatter?
I googled "tomcat log Formatter" but do not find anything useful.


      __________________________________________________________________
Looking for the perfect gift? Give the gift of Flickr! 

http://www.flickr.com/gift/

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

Reply via email to