You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@logging.apache.org by "Shushan Tong (JIRA)" <ji...@apache.org> on 2017/08/23 12:48:08 UTC

[jira] [Created] (LOG4J2-2024) TimeBasedTriggeringPolicy not work if no log written in the next hour

Shushan Tong created LOG4J2-2024:
------------------------------------

             Summary: TimeBasedTriggeringPolicy not work if no log written in the next hour
                 Key: LOG4J2-2024
                 URL: https://issues.apache.org/jira/browse/LOG4J2-2024
             Project: Log4j 2
          Issue Type: Bug
            Reporter: Shushan Tong


I want to create a new file every hour, but it does not work if no log written in the next hour(s), log4j2.xml configured as below:

<RollingFile name="RollingFile-for-bigdata" filename="${logPath}/bigdata/${logName}user_register.log" filepattern="${logPath}/bigdata/bak/b_%d{yyyyMMddHH}_user_register.dat">
   <PatternLayout pattern="%msg%n" />
   <Policies>
    <TimeBasedTriggeringPolicy  interval="1"  modulate="true" />
   </Policies>
   <Filters>
    ....
   </Filters>
   <DefaultRolloverStrategy max="24" />
  </RollingFile>



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)