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 05:36:00 UTC

[jira] [Commented] (LOG4J2-2562) RollingFileManager create wrong file name with TimeBasedTriggeringPolicy

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

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

I change time use windows gui tool bar

> 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)