I am using RollingFile appender. I want the log file to be rolled after every 20 minutes irrespective of the logging event. For instance in an hour I should have 3 log files even though there might have not been any logging in that hour. Is this possible using Log4j2? If yes please provide the configuration ( in log4j2.xml) that are required. The below config does not seem to work :
<RollingFile name="RECHARGE_NMCD" fileName="D:/rc_nmcd/rc_nmcd.log" append="true" bufferedIO="false" filePattern="D:/rc_nmcd/rc_nmcd_%d{yyyy-MM-dd-HH-mm}.process">
<PatternLayout>
<Pattern>%m%n</Pattern>
</PatternLayout>
<Policies>
<TimeBasedTriggeringPolicy interval="20"/>
</Policies>
<DefaultRolloverStrategy max="20" />
</RollingFile>