tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
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
Date Thu, 19 Feb 2009 18:41:12 GMT
-----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-----

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


Mime
View raw message