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

File not rolling over with SizeBasedTriggeringPolicy & FixedWindowRollingPolicy

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • logback-core
    • None
    • Solaris 10 10/08 s10s_u6wos_07b SPARC
      Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
      Use is subject to license terms.
      Assembled 27 October 2008

    Description

      I have a process that is kicked off by cron. It is suppose to role the file over with a size 1M. It doesn't. When I set it to 10K, it still doesn't. Here is my config file:
      <?xml version="1.0" encoding="UTF-8"?>
      <configuration>
      <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="RootFileAppender">
      <file>XMLExtract.log</file>
      <append>true</append>
      <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
      <level>info</level>
      </filter>
      <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
      <fileNamePattern>/u01/oracle/XmlExtract/XMLExtract.%i.zip</fileNamePattern>
      <maxIndex>5</maxIndex>
      </rollingPolicy>
      <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
      <maxFileSize>1M</maxFileSize>
      </triggeringPolicy>
      <layout class="ch.qos.logback.classic.PatternLayout">
      <pattern>%d

      {<yyyy-MM-dd [HH:mm:ss.SSS]>}

      ,[%C

      {1}

      ],[%M] — %m%n</pattern>
      </layout>
      </appender>
      <root>
      <level value="info"/>
      <appender-ref ref="RootFileAppender"/>
      </root>
      </configuration>

      I looked at http://jira.qos.ch/browse/LBCLASSIC-105 and as you can see, I put the full path of where I want the files to be archived. However, that has not worked for me either.

      Attachments

        Activity

          People

            ceki Ceki Gülcü
            tbednarek Thomas Bednarek
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated: