[logback-user] RollingFileAppender Issues

Ceki Gülcü ceki at qos.ch
Sat Jul 24 00:06:24 CEST 2010


Hello Omar,

You are perhaps not familiar with the the restrictions that apply to 
RollingFileAppender in prudent mode. These restrictions are documented 
at: http://logback.qos.ch/manual/appenders.html#prudentWithRolling

HTH,


On 23/07/2010 8:06 PM, Omar Alrubaiyan wrote:
>
> (oops, re-posting with some white space)
> Hello,
>
> I’m trying to use logback for a distributed application thatI’m working on. I have a custom appender that buffers log messages and thensends them over to a central logger via RMI. The central logger collects thelogs and outputs them to a logback logger that uses a RollingFileAppender witha FixedWindowRollingPolicy and a SizeBasedTriggeringPolicy.
>
> The problem is when the log file hits the size limit insteadof renaming the file and starting a new one it creates 10 (or whatever the maxindex is for the window) copies of the same file and slows down while failingto properly roll over. This results in (after the first rollover trigger) 1 + max index copies of the same file all of which are over the size limit. This issue does not occur when using the same logback configuration file on a single jvm setup.
>
> I’ve tried the following:
> - Did away with the custom appender on the clientsside and just transmitted raw messages over RMI (i.e. only one central Logback loggeris used). Did not resolve the issue.
> - Switched to a TimeBasedRollingPolicy, under this policy the archiving seems to work properly but the rollover never occurs (the original log file keeps growing).
> - Switched the central logger over to log4j, this fixed the issue, although I would rather use logback instead.
>
> Any ideas about what could be causing this?
>
> Thanks,
> Omar


More information about the Logback-user mailing list