You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by "Lewark, Andreas" <An...@t-systems.de> on 2001/07/03 15:12:27 UTC
Logged Time
Hello,
does anybody know how I can output the timestamp of the logging event
in my local timezone. The timestamps are 2 hours too early.
I'm using a Fileapender with Patternlayout.
I think the time is internally logged in UTC, can I configure the Output (in
XML)
to match my local time?
Thanks for your help.
Andreas
Re: Logged Time
Posted by Paul Glezen <pg...@atdial.net>.
> "Lewark, Andreas" wrote:
> does anybody know how I can output the timestamp of the logging event
> in my local timezone. The timestamps are 2 hours too early.
> I'm using a Fileapender with Patternlayout.
> I think the time is internally logged in UTC, can I configure the
> Output (in XML)
> to match my local time?
>
Since this has changed some months ago, you should specify what version
of log4j you are using. In any case, the time is stored in UTC format.
That means the appender should be using the default locale to display
the time. Do the production and consumption of the logging event occur
in the same timezone? Are you sure the clocks on the computers are
accurate?
- Paul
--
Beware of bugs in the above code. I have
only proved it correct, not tried it.
-Don Knuth
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org