[logback-dev] [JIRA] Created: (LBCORE-236) SizeAndTimeBasedFNATP does not account for last file being compressed

TJ Rothwell (JIRA) noreply-jira at qos.ch
Thu Nov 10 18:36:12 CET 2011


SizeAndTimeBasedFNATP does not account for last file being compressed
---------------------------------------------------------------------

                 Key: LBCORE-236
                 URL: http://jira.qos.ch/browse/LBCORE-236
             Project: logback-core
          Issue Type: Bug
          Components: Rolling
    Affects Versions: 1.0.0
            Reporter: TJ Rothwell
            Assignee: Logback dev list


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

{noformat}
  <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>
{noformat}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the logback-dev mailing list