[logback-dev] [JIRA] Commented: (LBCORE-123) File not rolling over with SizeBasedTriggeringPolicy & FixedWindowRollingPolicy

Karol Bucek (JIRA) noreply-jira at qos.ch
Wed Nov 11 16:26:44 CET 2009

    [ http://jira.qos.ch/browse/LBCORE-123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11370#action_11370 ] 

Karol Bucek commented on LBCORE-123:

I can confirm the same behaviour on Sun JDK 1.6.0_05 on Windows XP running in a webapp, the logback configuration was the following :


  <appender name="R" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <layout class="ch.qos.logback.classic.PatternLayout">
      <Pattern>%date{dd MMM yyyy HH:mm:ss} [%logger] : %level - %message%n</Pattern>
    <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
    <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
  <logger name="global" level="debug"/>


after reaching 20MB the some.log file didn't change at all and I didn't found another file where the logging continued ... I guess it was working OK with smaller file size or having just the name in the <FileNamePattern>, but I'm not sure will investigate and add a comment if I do find out something ...

> File not rolling over with SizeBasedTriggeringPolicy & FixedWindowRollingPolicy
> -------------------------------------------------------------------------------
>                 Key: LBCORE-123
>                 URL: http://jira.qos.ch/browse/LBCORE-123
>             Project: logback-core
>          Issue Type: Bug
>          Components: Rolling
>    Affects Versions: 0.9.17
>         Environment: 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
>            Reporter: Thomas Bednarek
>            Assignee: Logback dev list
> 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{&lt;yyyy-MM-dd [HH:mm:ss.SSS]&gt;},[%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.

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