This is my logback settings, I set single log size 500MB, and the minIndex is 1,max is 5. <appender name="extractorAppender" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>/data/logs/extractor.log</file> <append>true</append> <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> <fileNamePattern>/data/logs/extractor.%i.log </fileNamePattern> <minIndex>1</minIndex> <maxIndex>5</maxIndex> </rollingPolicy> <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> <maxFileSize>500MB</maxFileSize> </triggeringPolicy> <encoder> <pattern>%d {yyy-MM-dd HH:mm:ss,GMT+8}
%p %t - %m%n</pattern> <charset class="java.nio.charset.Charset">UTF-8</charset> </encoder> </appender> but in my production environment, I found a log file up to 82G and a 966MB log file, and my linux system's disk space was used off.
|