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

RollingPolicy MaxHistory not deleting old files

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • None
    • logback-core
    • None
    • 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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: