C:\>java -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)
I'm running on Window XP SP 2 using Sun's JDK with log4j-1.3alpha-8.jar
When I use
ConversionPattern=%-5p %d{yyyy.MM.dd HH:mm:ss,SSS}{GMT+0} [%t] %c{1} -
%m%n
I get
INFO 2007.02.07 14:45:55,504{GMT+0} [main] Main
I'm now confused by the different patterns "{GMT+0}" vs "'GMT'Z" - which
one is correct?
Cheers, Eric
-----Original Message-----
From: Curt Arnold [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 07, 2007 2:27 PM
To: Log4J Users List
Subject: Re: UTC Time Stamps
On Feb 7, 2007, at 11:31 AM, Eric Kolotyluk wrote:
> Thanks,
>
> ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss.SSS 'GMT'Z} %c [%t] -
> %m%n
>
> Seems to work better, but I get
>
> INFO 2007.02.07 08:51:11,417 GMT-0800 [main] . . .
>
> When what I really want is
>
> INFO 2007.02.07 16:51:11,417 Z [main] . . .
>
> Can this be done? The point is when I'm comparing log files from
> different systems in different time zones the times match up and I
> don't
> have to do any mental arithmetic.
>
> Cheers, Eric
>
Could you please provide the platform that you are running on (OS,
JDK vendor and version) and any other information that you think
might be helpful to reproduce the problem you are seeing?
Did you try the suggestion of using {GMT+0}? {GMT} appears to work
fine on the JDK's that I've tested with, but the Javadoc for TimeZone
only documents GMT+nnn and GMT-nnn as being supported on all JDK's.
Did you try using the SVN head to see if it might be an already fixed
bug? You can download Gump generated jars at http://
vmgump.apache.org/gump/public-jars/logging-log4j/jars/ if you don't
want to set up an build environment.
If you can build log4j, do the unit test pass on your platform?
I'll try to reproduce your problem, but since you did not provide any
of this information when original asked, I just assumed that you had
solved the problem and were no longer interested in help.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]