--- 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, 10:27 AM
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> PoWah,
> 
> On 2/19/2009 8:14 AM, PoWah Wong wrote:
> > The /usr/tomcat/logs/catalina.out file has these
> entries:
> > Feb 18, 2009 8:56:27 PM
> org.apache.coyote.http11.Http11AprProtocol start
> > INFO: Starting Coyote HTTP/1.1 on http-8443
> > Feb 18, 2009 8:56:27 PM
> org.apache.catalina.startup.Catalina start
> > INFO: Server startup in 2377 ms
> 
> Are these the only log messages with this date format? How
> about others?
> I ask because it's possible that these specific log
> messages have the
> date format hard-coded into them.
> 
> > How to convert date from Feb 18, 2009 8:56:27 PM to
> 2009-02-18 20:56:27?
> > 
> > I set the files
> > /opt/axis2-1.2/webapp/WEB-INF/classes/log4j.properties
> >
> /usr/local/apache-tomcat-6.0.10/webapps/xmc/WEB-INF/classes/log4j.properties
> 
> This configures log4j for your application, and does not
> affect Tomcat.
> You need to modify CATALINA_BASE/conf/logging.properties in
> order to
> affect Tomcat's logging.
> 
> http://tomcat.apache.org/tomcat-6.0-doc/logging.html
> 
> - -chris
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla -
> http://enigmail.mozdev.org
> 
> iEYEARECAAYFAkmdekkACgkQ9CaO5/Lv0PB6fACfRbZe/wpTGjySUQaJ04+tyEWE
> bFoAn1uFEHUgKcP8qwmhKiXmBM9eXFaR
> =yZ08
> -----END PGP SIGNATURE-----
> 

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
...



      __________________________________________________________________
Be smarter than spam. See how smart SpamGuard is at giving junk email the boot 
with the All-new Yahoo! Mail.  Click on Options in Mail and switch to New Mail 
today or register for free at http://mail.yahoo.ca

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

Reply via email to