Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-747

maxHistory doesnot normally work in SizeAndTimeBasedFNATP

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1.7
    • Component/s: None
    • Labels:
      None

      Description

      <appender name="sizeAndTimeBased" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>./logs/ExtensibleServices.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
          <fileNamePattern>./logs/ExtensibleServices.%d{yyyyMMdd}.%i.log</fileNamePattern>
          <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
            <maxFileSize>1MB</maxFileSize>
            <maxHistory>2</maxHistory>  <!--this is a bug-->
          </timeBasedFileNamingAndTriggeringPolicy>
        </rollingPolicy>
        <encoder>
          <pattern>%d{yyyy-MM-dd}T%d{HH:mm:ss.SSS} %msg%n</pattern>
        </encoder>
      </appender>
      

      The figure below describes the test result.

        Attachments

          Activity

            People

            • Assignee:
              ceki Ceki Gülcü
              Reporter:
              billy Billy Wang
            • Votes:
              13 Vote for this issue
              Watchers:
              23 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: