-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Reopen log file when rollover is unsuccessful #3226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reopen log file when rollover is unsuccessful #3226
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your PR. It certainly solves the #2592 issue, but I would take the opportunity to clarify some RollingFileManager
code.
IMHO, the code of the rolling file appenders is very unclear and hard to maintain, which is the cause of the multitude of bug reports for this component.
log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java
Outdated
Show resolved
Hide resolved
log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java
Outdated
Show resolved
Hide resolved
...est/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManagerTest.java
Show resolved
Hide resolved
...est/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManagerTest.java
Outdated
Show resolved
Hide resolved
Thank You for your contribution! 💯 |
Fixes `RollingFileManager` to reopen the log file when the rollover was unsuccessful
Fixes #2592
Fixes
RollingFileManager
to reopen the log file when the rollover was unsuccessfulSee also #3021 (comment)
Checklist
2.x
branch if you are targeting Log4j 2; usemain
otherwise./mvnw verify
succeeds (if it fails due to code formatting issues reported by Spotless, simply run./mvnw spotless:apply
and retry)src/changelog/.2.x.x
directory