Great, this works fine.<br><br>S.D.<br><br><b><i>Ceki Gülcü &lt;listid@qos.ch&gt;</i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> <br>Hello Samuel,<br><br>I'd try the following. (Apologies, I did not have time to test it, so<br>it might contain minor mistakes.)<br><br>   <appender name="bitranlog"><br>class="ch.qos.logback.core.rolling.RollingFileAppender"&gt;<br>     <rollingPolicy><br>class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"&gt;<br>       <param name="ActiveFile" value="bitran.log"><br>       <param name="FileNamePattern" value="bitran.%i.log"><br>       <param name="MinIndex" value="1"><br>       <param name="MaxIndex" value="3"><br>     </rollingPolicy><br><br>     <triggeringPolicy><br>class="ch.qos.logback.core.rolling.SizeBasedRollingPolicy"&gt;<br>       <param name="MaxFileSize" value="5MB"><br>     </triggeringPolicy><br><br>     <layout
 class="ch.qos.logback.classic.PatternLayout"><br>       <param name="pattern" value="%-4relative [%thread] %-5level %class - &lt;br&gt;%msg%n"><br>     </layout><br>   </appender><br><br>The TimeBasedRollingPolicy based example that you would usually want<br>to use in real life (instead of the above) is less verbose, and just as <br>powerful.<br><br>   <appender name="FILE"><br>class="ch.qos.logback.core.rolling.RollingFileAppender"&gt;<br>     <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"><br>       <param name="FileNamePattern" value="foo_%d{yyyy-MM}.log" .zip=""><br>       <param name="ActiveFileName" value="foo.log"><br>     </rollingPolicy><br>     <layout class="ch.qos.logback.classic.PatternLayout"><br>       <param name="Pattern" value="%-4relative [%thread] %-5level %class - &lt;br&gt;%msg%n"><br>     </layout><br>   </appender><br><br>You might also want to have a look at the
 javadocs.<br><br>http://logback.qos.ch/apidocs/ch/qos/logback/core/rolling/SizeBasedTriggeringPolicy.html<br>http://logback.qos.ch/apidocs/ch/qos/logback/core/rolling/FixedWindowRollingPolicy.html<br>http://logback.qos.ch/apidocs/ch/qos/logback/core/rolling/TimeBasedRollingPolicy.html<br><br>If you run into problems, please let us know.<br><br><br>At 08:24 PM 9/14/2006, Samuel Doyle wrote:<br>&gt;Hi, using this it is now complaining about a triggeringpolicy.<br>&gt;<br>&gt;INFO in ch.qos.logback.core.joran.action.AppenderAction - About to <br>&gt;instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]<br>&gt;INFO in ch.qos.logback.core.joran.action.AppenderAction - Appender named <br>&gt;as [bitranlog]<br>&gt;ERROR in ch.qos.logback.core.joran.action.NestedComponentIA - Could not <br>&gt;create component <rollingPolicy>.<br>&gt;WARN in ch.qos.logback.core.rolling.RollingFileAppender[bitranlog] - <br>&gt;Please set a TriggeringPolicy for the
 RollingFileAppender named bitranlog<br>&gt;INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender <br>&gt;named [bitranlog] from the object stack<br><br>-- <br>Ceki Gülcü<br>Logback: The reliable, generic, fast and flexible logging framework for Java.<br>http://ceki.blogspot.com/<br><br>_______________________________________________<br>Logback-user mailing list<br>Logback-user@qos.ch<br>http://qos.ch/mailman/listinfo/logback-user<br></rollingPolicy></blockquote><br>