Summary: | DailyRollingFileAppender may lose messages during failed rollover | ||
---|---|---|---|
Product: | Log4j - Now in Jira | Reporter: | arnauldvm <arnauldvm> |
Component: | Appender | Assignee: | log4j-dev <log4j-dev> |
Status: | RESOLVED FIXED | ||
Severity: | critical | CC: | arnauldvm, bouliz, khitrenovich |
Priority: | P2 | ||
Version: | 1.2 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Attachments: |
Patch solving the issue
Unit test reproducing the bug Patch solving the issue |
Description
arnauldvm
2007-09-13 01:07:45 UTC
Created attachment 20806 [details]
Patch solving the issue
Created attachment 20807 [details]
Unit test reproducing the bug
Created attachment 20809 [details]
Patch solving the issue
(Cleaner version of the patch)
Committed changes in rev 577413. I could not come up with a scenario where it would be undesirable to append to the base log file name, so instead of calculating whether to append based on rename failure, I just hard-coded it to append. I created a much simpler test to add to the existing DRFATestCase that fails with the old code. Changed the bug title since the DRFA is expected to delete files, but not to lose messages. There is a similar bug 44932, which is reported for log4j version 1.2.15. Does this fix also address the issue mentioned in the bug 44932? There is an issue we have for our application where in rare scenarios, the rollover files are getting deleted and our application starts writing to a single log file which then grows to over 50GB. We are using log4j version 1.2.15. So I am not sure if we should move to the latest version 1.2.16 which has this fix or whether the due to issue mentioned in 44932 (which is still open), the application will continue to behave erratically at times. (In reply to comment #5) > There is a similar bug 44932, which is reported for log4j version 1.2.15. Does > this fix also address the issue mentioned in the bug 44932? There is an issue > we have for our application where in rare scenarios, the rollover files are > getting deleted and our application starts writing to a single log file which > then grows to over 50GB. We are using log4j version 1.2.15. > So I am not sure if we should move to the latest version 1.2.16 which has this > fix or whether the due to issue mentioned in 44932 (which is still open), the > application will continue to behave erratically at times. We have the same problem ! I think it could be solve issue 44932 but im not sure. |