Logback is equipped with the problem that the value of% d of aux remains unchanged in the new file.

* logback version 1.2.3
what I expect:
1. If you cross days, regenerate a log file
2. If the log file size exceeds 4MB, regenerate a log file
3. The date information in the log file name is the time information when the log is generated.
4. Clean up the log files 100 days ago
5, and the log files that store 1GB at most
. I use the configuration
below to get the result that if the newly generated log file is on the same day as the previous log file, then the time information remains the same as in the following figure

.

configure as follows

  <appender name="TEST-FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">

            <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
                <!--   4MB1MB-->
                <fileNamePattern>${TEST_FILE_PATH}/xweb.%d{yyyyMMdd}_%d{HHmmssSSS,aux}.%i.log</fileNamePattern>
                <!--  -->
                <MaxHistory>100</MaxHistory>
                <maxFileSize>4MB</maxFileSize>
                <totalSizeCap>1GB</totalSizeCap>
                <cleanHistoryOnStart>false</cleanHistoryOnStart>

            </rollingPolicy>
            <layout class="ch.qos.logback.classic.PatternLayout">
                <pattern>${PATTERN}</pattern>
            </layout>
        </appender>
Mar.06,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf290f-4639a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf290f-4639a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?