[logback-user] RollingFileAppender with SizeBasedTriggeringPolicy keeps writing to rotated file
David Roussel
nabble at diroussel.xsmail.com
Fri May 24 15:21:55 CEST 2013
Roland,
That sounds strange. Can you post your logback.xml file?
David
On 23 May 2013, at 00:03, Rolando Segura <rolandosegura at gmail.com> wrote:
> Hi I have an RollingFileAppender with a triggering policy of rotating by size when the log reaches 32MB and a maxIndex of 1, configuration below.
> It happens that after rotation logback keeps writing to both files. Is this expected? My understanding from documentation is that it will stop writing to the current log, rename it and starts writing a to a new file with the name of the File parameter.
>
> I'd appreciate your clarification if I'm not understanding well the RollingFileAppender and SizeBasedTriggering behavior.
>
> Thanks,
> Rolando
>
>
>
> <appender name="lognocrlf" class="ch.qos.logback.core.rolling.RollingFileAppender">
> <File>/opt/log/file.nocrlf.log</File>
> <encoder>
> <pattern>[%d{ISO8601}] %5p [%t] \(%logger\) - %replace(%m){'\r?\n',''}%n</pattern>
> </encoder>
> <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
> <maxIndex>1</maxIndex>
> <FileNamePattern>/opt/log/file.nocrlf.log.%i</FileNamePattern>
> </rollingPolicy>
> <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
> <MaxFileSize>32MB</MaxFileSize>
> </triggeringPolicy>
> </appender>
>
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-user
More information about the Logback-user
mailing list