logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@apache.org>
Subject Re: Log4cxx obliterates the TZ setting...
Date Wed, 01 Sep 2004 17:56:38 GMT
I had noticed the potential for the problem and logged it as 
http://nagoya.apache.org/jira/browse/LOGCXX-11.  Thanks for confirming 
that is actually a problem.  My suspicion is that gmtime or gmtime_r is 
not adequate since log4cxx may need to format times to a time-zone 
other than the current time zone.  However, it might be an optimization 
if the timezone for the layout and the current timezone are the same.  
I guess the first thing is to at least reset the value of TZ to the 
initial value after collecting time zone offsets.

On Sep 1, 2004, at 11:40 AM, renny.koshy@rubixinfotech.com wrote:

> We have some code which started behaving strange after going to 
> log4cxx for logging... I've isolated it down to the fact that log4cxx 
> obliterates the TZ settings in timezone.cpp and 
> dailyrollingfileappender.cpp
> Questions:
>         Instead of changing to GMT to calculate the diff, why not use 
> gmtime() or gmtime_r()?
>                 - I've done this in our code that had to calculate 
> this difference for a LogFile class that dates back almost 8 years...
>                 - This way there is not "side-effect"...
>         *IF* I change the code to work that way, any chance of having 
> it included in the 'official' package?

View raw message