Reputation: 1
I have below config and its rolling policy is working to keep the file to max of 5 files. But the triggering policy is getting triggered on random file sizes for rotation. Not rotating on the exact size mentioned in
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>${LOG_FOLDER}/old.log.%i</fileNamePattern>
<minIndex>1</minIndex>
<maxIndex>5</maxIndex>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<maxFileSize>5000000</maxFileSize>
</triggeringPolicy>
<encoder>
<Pattern>${FILE_PATTERN}</Pattern>
</encoder>
Upvotes: 0
Views: 24