Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Bug
-
None
-
None
-
None
-
None
Description
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>