--- On Thu, 2/19/09, Martin Gainty <mgai...@hotmail.com> wrote:

> From: Martin Gainty <mgai...@hotmail.com>
> 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, 12:51 PM
> Wong-
> 
> SimpleDateFormat  is not a attribute in
> java.util.logging.ConsoleHandler
> http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/ConsoleHandler.html
> 
> but org.apache.commons.logging.impl.SimpleLog contains the
> datetime attributes you seek
> org.apache.commons.logging.simplelog.showdatetime -
>      Set to true if you want the current date and time
>      to be included in output messages. Default is
> false.org.apache.commons.logging.simplelog.dateTimeFormat -
>      The date and time format to be used in the output
> messages.
>      The pattern describing the date and time format is the
> same that is
>      used in java.text.SimpleDateFormat. If the format is
> not
>      specified or is invalid, the default format is used.
>      The default format is yyyy/MM/dd HH:mm:ss:SSS zzz.
> please refer to commons-logging JavaDocs for operational
> specifics
> http://commons.apache.org/logging/apidocs/index.html
> 
> Martin 
> ______________________________________________ 
> Disclaimer and confidentiality note 
> Everything in this e-mail and any attachments relates to
> the official business of Sender. This transmission is of a
> confidential nature and Sender does not endorse distribution
> to any party other than intended recipient. Sender does not
> necessarily endorse content contained within this
> transmission. 
> 
> 
> 
> 
> > Date: Thu, 19 Feb 2009 08:51:36 -0800
> > From: wong_po...@yahoo.ca
> > Subject: Re: convert date from Feb 18, 2009 8:56:27 PM
> to 2009-02-18 20:56:27
> > To: users@tomcat.apache.org
> > 
> > 
> > --- 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
> > ...
> 
__________________________________________________________________


These two did not work after restarting tomcat:
java.util.logging.ConsoleHandler.SimpleLog.dateTimeFormat = yyyy-MM-dd HH:mm:ss
java.util.logging.ConsoleHandler.SimpleLog.dateTimeFormat = "yyyy-MM-dd 
HH:mm:ss"



      __________________________________________________________________
Ask a question on any topic and get answers from real people. Go to Yahoo! 
Answers and share what you know at http://ca.answers.yahoo.com

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

Reply via email to