DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34979>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34979





------- Additional Comments From [EMAIL PROTECTED]  2005-05-25 23:48 -------
RollingPolicyBase.activeFileName overlapped conceptually with 
FileAppender.file.  The current code 
should work with an explicit active file name specified using either method, 
but the RPB.activeFileName 
should be removed after next cycle (currently marked deprecated).

FixedWindowRollingPolicy had required a value for RPB.activeFileName unlike 
TimeBasedRollingPolicy 
which would use FileNamePattern if no explicit filename was specified.  FWRP 
has been modified so that 
if no explicit active file is specified (using either RPB.activeFileName or 
FileAppender.file), the 
FileNamePattern will be evaluted to determine an active file name.  A pattern 
of "MyLog.%i" would 
typically result in "MyLog.0" being the active log file and on rollover it 
would be come "MyLog.1", etc.

The renaming loop in FWRP has been changed to prevent a rapid series of 
rollover failures (perhaps due 
to a locked file) from quickly deleting all files above the locked file.  If 
for example, MyLog.2 existed 
and MyLog.1 was locked, each logged message after a size threshold was reached 
would result in 
MyLog.2 being incremented until it reached the maxIndex when it would be 
deleted.  The current code 
collects file names from walking up from minIndex until there is a gap in the 
sequence.  So if MyLog.1 
and MyLog.3 existed and MyLog.2 was missing (likely state after a rollover 
failure due to MyLog.1 being 
locked), MyLog.1 would be renamed as MyLog.2 but higher logs would be 
unchanged.  In addition, this 
should reduce the number of File.exists calls when the chain of log files is 
not full.

The only additional things I can think of now:

A heartbeat (or equivalent) to RFA to specify an interval on which rollover 
would be evaluated (to 
address the case of a TimeBasedRollingPolicy skipping days when the log can be 
quiet for a lengthy 
period).

A maxAge on TimeBasedRollingPolicy that would indicate a number of periods 
(milliseconds?) after 
which a old log file would be deleted or a maxSize that would delete log files 
with the earliest 
timestamps after the cumulative size had been exceeded.  However, I think both 
approaches would be 
non-trivial.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to