You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Srikanth (Jira)" <ji...@apache.org> on 2022/02/24 05:23:00 UTC

[jira] [Commented] (LOG4J2-3226) RollingFileAppender doesn´t work with cronTriggeringPolicy configured to rename everyday (everyminute it works correctly). The logger is still writing in the same File

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

Srikanth commented on LOG4J2-3226:
----------------------------------

Hello All,

I am also facing the same issue, I am using TimeBasedTriggeringPolicy with interval="1".

 

Ideally the log file needs to rotate each day but this is not working and logs are getting log in the old file itself.

 

Advance Thanks for the answer. Waiting for the fix.

 

Thanks.

> RollingFileAppender doesn´t work with cronTriggeringPolicy configured to rename everyday (everyminute it works correctly). The logger is still writing in the same File
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LOG4J2-3226
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-3226
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 2.11.2, 2.12.0, 2.12.1, 2.13.0, 2.13.1, 2.13.2, 2.14.0, 2.13.3, 2.14.1, 2.15.0, 2.16.0
>            Reporter: Juan Andrés Garrido
>            Priority: Major
>
> With this configuration
> ........
>         <RollingFile name="XXXX" filePattern="c:\test%d\{yyyyMMdd}.log">
>             <PatternLayout pattern="%d\{dd/MM/yyyy HH:mm:ss,SSS}[%p][%c\\{1}]* %m%n"/>
>             <Policies>
>                 <CronTriggeringPolicy schedule="0 0 0 * * ?"/>
>             </Policies>
>         </RollingFile>
> ......
>  
> The logger doesn´t rename the file, the application is always writing in the same file. I have been testing with each version from 2.8 to 2.16 and the problem appears with 2.11.2 and in newer versions too. I am also working with Java 1.8.065



--
This message was sent by Atlassian Jira
(v8.20.1#820001)