Bug 7550 - DailyRollingFileAppender defaults to HALF_DAY rotation when you specify TOP_OF_DAY rotation
DailyRollingFileAppender defaults to HALF_DAY rotation when you specify TOP_O...
Status: RESOLVED FIXED
Product: Log4j
Classification: Unclassified
Component: Appender
1.2beta
Sun Solaris
: P3 minor
: ---
Assigned To: log4j-dev
:
: 7515 (view as bug list)
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2002-03-28 00:26 UTC by Sean Harp
Modified: 2004-11-16 19:05 UTC (History)
1 user (show)



Attachments
Simple hack to get around the TOP_OF_DAY vs HALF_DAY datePattern problem (799 bytes, patch)
2002-03-28 00:41 UTC, Sean Harp
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Harp 2002-03-28 00:26:27 UTC
In computeCheckPeriod(), the check for HALF_DAY always returns true before the
check for TOP_OF_DAY.  Whenever I specified yyyy-MM-dd as my datePattern, the
result was always to settle on a half-day rotation.  I've hacked my copy of the
source to fix the problem, but the real fix should probably be to add a new
configuration directive for the rolling interval instead of inferring it from
the datePattern.
Comment 1 Sean Harp 2002-03-28 00:41:06 UTC
Created attachment 1437 [details]
Simple hack to get around the TOP_OF_DAY vs HALF_DAY datePattern problem
Comment 2 Ceki Gulcu 2002-04-25 14:51:44 UTC
Sean,

What timezone are you in?
Comment 3 Sean Harp 2002-04-25 15:41:04 UTC
I experienced the problem on a Solaris machine set to US/Eastern.  I'm in the
EST timezone.
Comment 4 Ceki Gulcu 2002-05-09 10:28:44 UTC
Sean,

As you reported, there was a problem with the way the DailyRollingFileAppender 
computed the rollover preriod in certain timezones. This has been corrected in
the log4j version which is in our CVS repository. Please reopen this bug if it 
does not work for you.
Comment 5 Ceki Gulcu 2002-05-09 16:47:25 UTC
*** Bug 7515 has been marked as a duplicate of this bug. ***