Well, they even answered the question, I wanted to publish the work that we created until the error is fixed in 1.1.8.
error 1166 just does not apply totalSizeCap to the first two units of time , it depends on the smallest unit on the NamePattern file that you use, which means that for your scenario it will not consider the logs of the first two hours for caption totalSize.
My configuration was somehow taken from logback - examples;
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <!-- daily rollover --> <fileNamePattern>logFile.%d{yyyy-MM-dd}.log</fileNamePattern> <!-- keep 30 days' worth of history capped at 3GB total size --> <maxHistory>30</maxHistory> <totalSizeCap>3GB</totalSizeCap> </rollingPolicy>
So, we just switched from {yyyy-MM-dd} to {yyyy-MM-dd_HH} and, of course, maximized maxHistory to 30 * 24 . Thus, we made the last two hours not closed, and not the last two days , and for our case it was skipped. Of course, the log files will begin to tip over every hour, but, as I said, this is normal for our unique case.
Guillotine1789
source share