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

RollingPolicy MaxHistory not deleting old files

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: logback-core
    • Labels:
      None
    • Environment:

      linux 2.6.18 64bits apache-tomcat-6.0.20 java/jre1.6.0_18

      Description

      The MaxHistory does not do the trick : the old files are not deleted at all :
      cat logging.xml
      <appender name="IDP_ACCESS" class="ch.qos.logback.core.rolling.RollingFileAppender">
      <File>/shibboleth-idp/logs/idp-access.log</File>
      <Append>false</Append>
      <ImmediateFlush>true</ImmediateFlush>

      <RollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
      <FileNamePattern>/shibboleth-idp/logs/old/idp-access-%d

      {yyyy-MM-dd_HH-mm}

      .log.gz</FileNamePattern>
      <MaxHistory>3</MaxHistory>
      </RollingPolicy>

      <layout class="ch.qos.logback.classic.PatternLayout">
      <Pattern>%msg%n</Pattern>
      </layout>
      </appender>

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ceki Ceki Gülcü
                Reporter:
                diazmaurin Rafael Diaz Maurin
              • Votes:
                10 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: