Bugs: Browse | Submit New | Admin

[#28762] Fix for ArgumentError in RollingFileOutputter#makeNewFilename if next sequence number > 999999

Date:
2010-12-02 18:59
Priority:
3
Submitted By:
Brandon Tilley (binarymuse)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
Fix for ArgumentError in RollingFileOutputter#makeNewFilename if next sequence number > 999999

Detailed description
Currently, if the RollingFileOutputter is allowed to create 999999 files (even if old files are deleted), Log4r will
throw an ArgumentError when it's time to roll the log files. This fix resets @current_sequence_number back to 1 if the
old @current_sequence_number was 999999.

Please see https://github.com/BinaryMuse/log4r/compare/master...sequence_fix or the attached diff for a proposed code
change.

Add A Comment: Notepad

Please login


Followup

Message
Date: 2010-12-02 19:05
Sender: Brandon Tilley

My original patch contained a bug; I have fixed my version
at the GitHub URL above and also have attached a fixed diff.

Attached Files:

Name Description Download
sequence_fix.diff Proposed patch Download
sequence_fix.patch Proposed patch v2 Download

Changes:

Field Old Value Date By
summaryFix for ArgumentError in RollingFileOutputter#makeNewFilename if next sequence number > 9999992010-12-02 19:06binarymuse
File Added5043: sequence_fix.patch2010-12-02 19:06binarymuse
summaryFix for ArgumentError in RollingFileOutputter#makeNewFilename if next sequence number > 9999992010-12-02 19:05binarymuse
File Added5042: sequence_fix.diff2010-12-02 18:59binarymuse