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 Tim Collins <ti...@myplay.com> on 2001/10/17 00:00:53 UTC

UTC Timestamp

Hi all,
Im trying to find a simple way to have my log write the timestamp in UTC
instead of localtime.  I dont see any options for this in the PatternLayout
documentation orany where else for that matter.  I know the events are
stored as UTC so i asssume there is an easy way to do this , I just dont
know it

any help would be greatly appreciated
thanks
-Tim Collins


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Re: UTC Timestamp

Posted by T Master <tm...@iknowledgeinc.com>.
Use this in your properties file:

log4j.appender.MyDestination.layout.ConversionPattern=%d{YYYY-mm-dd
HH:mm:ss,SSS}  %c  %m  %n

Modify the date format after the %d and within the { }  to suit UTC format.

My 2cents worth!!

T Master


----- Original Message -----
From: "Tim Collins" <ti...@myplay.com>
To: <lo...@jakarta.apache.org>
Sent: Tuesday, October 16, 2001 4:00 PM
Subject: UTC Timestamp


>
> Hi all,
> Im trying to find a simple way to have my log write the timestamp in UTC
> instead of localtime.  I dont see any options for this in the
PatternLayout
> documentation orany where else for that matter.  I know the events are
> stored as UTC so i asssume there is an easy way to do this , I just dont
> know it
>
> any help would be greatly appreciated
> thanks



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org