You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by doug b <um...@yahoo.com> on 2002/03/21 21:14:53 UTC

DailyRollingFileAppender, TimeZone, bugs?

first, we are using 1.1.4 and we also have seen the
problem where the rollover doesn't occur if the
program isn't running when the time change occurs.  a
search showed the statement that this was fixed in
"1.16".  i have no idea whether that was before 1.1.4
or after or how i would get that fix (short of moving
to 1.2beta).

second, though, this appender doesn't seem to handle
TimeZones other than GMT properly.  namely, when it's
determining which rollover type to use, it starts with
a time of 0 GMT, which is 18:00 December 31, 1969 in
my timezone.  the RolloverCalendar.getNextCheckDate
method succeeds in the HALF_DAY case, rather than the
TOP_OF_DAY case, and incorrectly determines that the
log is "to be rolled at midday and midnight" instead
of "at midnight" only.  the file really is only
rolling over once a day - i think the extra filename
check in rollover() fixes this - but the type is
definitely wrong.

finally, we started looking into this because we have
a need to rollover logs in our customer's TimeZone,
rather than in our TimeZone.  so we're implementing a
TimeZoneDailyRollingFileAppender which is only barely
different from the DailyRollingFileAppender.  is this
a capability that someone has already written?  has it
been requested before?  would it be worthwhile to fold
into the DailyRollingFileAppender?

thanks for any thoughts.
-doug


__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards�
http://movies.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: DailyRollingFileAppender, TimeZone, bugs?

Posted by doug b <um...@yahoo.com>.
anyone?

--- doug b <um...@yahoo.com> wrote:
> first, we are using 1.1.4 and we also have seen the
> problem where the rollover doesn't occur if the
> program isn't running when the time change occurs. 
> a
> search showed the statement that this was fixed in
> "1.16".  i have no idea whether that was before
> 1.1.4
> or after or how i would get that fix (short of
> moving
> to 1.2beta).
> 
> second, though, this appender doesn't seem to handle
> TimeZones other than GMT properly.  namely, when
> it's
> determining which rollover type to use, it starts
> with
> a time of 0 GMT, which is 18:00 December 31, 1969 in
> my timezone.  the RolloverCalendar.getNextCheckDate
> method succeeds in the HALF_DAY case, rather than
> the
> TOP_OF_DAY case, and incorrectly determines that the
> log is "to be rolled at midday and midnight" instead
> of "at midnight" only.  the file really is only
> rolling over once a day - i think the extra filename
> check in rollover() fixes this - but the type is
> definitely wrong.
> 
> finally, we started looking into this because we
> have
> a need to rollover logs in our customer's TimeZone,
> rather than in our TimeZone.  so we're implementing
> a
> TimeZoneDailyRollingFileAppender which is only
> barely
> different from the DailyRollingFileAppender.  is
> this
> a capability that someone has already written?  has
> it
> been requested before?  would it be worthwhile to
> fold
> into the DailyRollingFileAppender?
> 
> thanks for any thoughts.
> -doug



__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards�
http://movies.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>