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

SizeAndTimeBasedFNATP does not account for last file being compressed

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • logback-core
    • None

    Description

      When SizeAndTimeBasedFNATP determines it's initial index, it will not increment the counter if <file> has not been specified for the FileAppender.

        <appender name="DEBUG-FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
          <!-- Use file format from rolling policy: http://logback.qos.ch/manual/appenders.html#TimeBasedRollingPolicy -->
          <!-- <file>${CONTEXT_DATA_PATH}/logs/server-debug.txt</file> -->
          <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
            <pattern>${DEBUG_FILE_PATTERN}</pattern>
          </encoder>
          <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${CONTEXT_DATA_PATH}/logs/server/server-debug.%d{yyyy-MM-dd}.%i.txt.zip</fileNamePattern>
            <maxHistory>${DEBUG_FILE_MAX_HISTORY}</maxHistory>
            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
              <maxFileSize>100MB</maxFileSize>
            </timeBasedFileNamingAndTriggeringPolicy>
          </rollingPolicy>
          <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
            <level>${DEBUG_FILE_LEVEL}</level>
          </filter>
        </appender>
      

      Attachments

        Activity

          People

            logback-dev Logback dev list
            trothwell TJ Rothwell
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: