[ 
https://issues.apache.org/jira/browse/LOG4J2-2562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16802601#comment-16802601
 ] 

finalmachine commented on LOG4J2-2562:
--------------------------------------

four year ago,someone has meet this problem

[https://stackoverflow.com/questions/28285523/strange-timestamp-duplication-when-renaming-and-recreating-a-file]

> 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
>            Priority: Major
>              Labels: patch
>         Attachments: log4j2.xml
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> 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)

Reply via email to