logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@apache.org>
Subject Re: Force a TimeZone (TimeZoneID parameter) with TTCCLayout fails...
Date Mon, 26 Jun 2006 17:50:27 GMT

On Jun 26, 2006, at 3:05 AM, sylvain richet wrote:

> Oups ! I think i made a mistake on declaration of TimeZoneID  
> parameter :
>
> I also tried with :
>        log4j.appender.CONSOLE.layout.TimeZoneID=GMT-8:00
>
> ... instead of previous :
>        log4j.appender.CONSOLE.layout.DateFormat.TimeZoneID=GMT-8:00
>
> ... it fails too...
>

There is a TimeZone property declared in  
org.apache.log4j.helpers.DateFormat, but not a TimeZoneID.  What  
happens if you replace TimeZoneID with TimeZone?  What suggested that  
you could specify TimeZoneID?

Another option with log4j 1.3 is to use a PatternConverter and use a  
second parameter on the %d pattern converter to specify the time  
zone, like:

%d{yyyy-MM-dd HH:mm:ss}{GMT}Z %d{HH:mm:ss Z} %c - %m%n

For more detail see bug 32064 (http://issues.apache.org/bugzilla/ 
show_bug.cgi?id=32064).



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


Mime
View raw message