<div class="gmail_quote">Dear sir/madam,<div><br></div><div>I am a university student trying to create a software related to my coursework and 1 of the requirements is that the output of logback file will rollover to new files every 5 minutes. I am unable to find a solution to this and i tried to use the periodictimebasedfilenamingandtriggeringpolicy. I cannot get any msg out of it.<br>
Here is my configuration in the xml when i use periodictimebasedfilenamingandtriggeringpolicy : </div><div><br></div><div><div><?xml version="1.0" encoding="UTF-8"?></div><div><configuration></div>
<div><span style="white-space:pre-wrap"> </span><appender name="rsms.rolling" class="ch.qos.logback.core.rolling.RollingFileAppender"></div><div><span style="white-space:pre-wrap"> </span><file>d:\\log\\RSMS\\RSMS.txt</file></div>
<div><span style="white-space:pre-wrap"> </span><ImmediateFlush>true</ImmediateFlush></div><div><span style="white-space:pre-wrap"> </span><rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"></div>
<div><span style="white-space:pre-wrap"> </span><!-- rollover daily --></div><div><span style="white-space:pre-wrap"> </span><fileNamePattern>d:\\log\\RSMS\\BK\\RSMS-%d{yyyy-MM-dd_HHmm}.%i.txt</fileNamePattern></div>
<div><span style="white-space:pre-wrap"> </span></rollingPolicy></div><div><span style="white-space:pre-wrap"> </span><triggeringPolicy class="ch.qos.logback.core.rolling.PeriodicTimeBasedFileNamingAndTriggeringPolicy"></div>
<div> <span style="white-space:pre-wrap"> </span> <period>600</period> </div><div> <span style="white-space:pre-wrap"> </span></triggeringPolicy></div><div><span style="white-space:pre-wrap"> </span></div>
<div> <span style="white-space:pre-wrap"> </span><layout class="ch.qos.logback.classic.PatternLayout"></div><div> <span style="white-space:pre-wrap"> </span><Pattern>%d{yyyyMMdd HHmmss.SSS} [%-5level]%msg%n</Pattern></div>
<div> <span style="white-space:pre-wrap"> </span></layout></div><div> <span style="white-space:pre-wrap"> </span></appender></div><div><span style="white-space:pre-wrap"> </span><logger name="lol" level="debug" additivity="false"></div>
<div><span style="white-space:pre-wrap"> </span><appender-ref ref="rsms.rolling" /></div><div><span style="white-space:pre-wrap"> </span></logger></div><div></configuration></div>
</div>
</div><br>