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)

Reply via email to