You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "finalmachine (JIRA)" <ji...@apache.org> on 2019/03/05 02:55:00 UTC
[jira] [Created] (LOG4J2-2562) RollingFileManager create wrong file
name with TimeBasedTriggeringPolicy
finalmachine created LOG4J2-2562:
------------------------------------
Summary: RollingFileManager create wrong file name with TimeBasedTriggeringPolicy
Key: LOG4J2-2562
URL: https://issues.apache.org/jira/browse/LOG4J2-2562
Project: Log4j 2
Issue Type: Bug
Components: Appenders
Affects Versions: 2.11.2
Environment: windows 7 x64
java 11 openjdk x64
Reporter: finalmachine
Attachments: log4j2.xml
because of the app.log file is never delete, app.log file create time never change.
first day all log write in app.log
second day app.log content copy to app-first day.log, second day log write in app.log
third day app.log content copy to app-{color:#FF0000}first day{color}.log, third day log write in app.log
debug the code AbstractRolloverStrategy#getEligibleFiles:91 call PatternProcessor#formatFileName:257 create file use prevFileTime
prevFileTime is set at RollingFileManager#initialFileTime:683 use file creationTime.
I think third day app.log content should copy to app-{color:#FF0000}second day{color}.log. the code should delete app.log file then create file or use app.log last modify time
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)