Details
Description
When log file has reached rolling size, method "execute" on "org.apache.logging.log4j.core.appender.rolling.action.FileRenameAction" class run as follows:
1. Move the log file to a new one using a new name;
2. If move fails, then it renames the log file;
3. If rename fails, then it copies the original file and then:
3.1 Deletes original file;
3.2 if delete fails, then it truncates the original file contents.
Steps 2 and 3 are executed usually when original file is locked; after any successful step, the returning value should be "true", however after successfully executing step 3.2 it remains "false", avoiding the compression algorithm to be executed.
Attachments
Attachments
Issue Links
- is duplicated by
-
LOG4J2-1726 RollingFile appender doesn't gzip and rolling log archives
- Resolved
- links to