In my case, the time based rolling is working, but the rolling stops all together when I add the size based triggering policy to the rolling appender.
I'm sure my understanding of the various classes is to blame, but I would expect to be able to create and set a simple SizeBasedTriggeringPolicy that would work
in parallel with the timeBasedRollingPolicy like in your example. I added the status listener as mentioned below and don't see any messages that correlate to the size trigger.
The messages that I do see about the time and file name pattern look correct.
Since yesterday I was able to get this working by using a SizeAndTimeBasedFNATP and setting it like rollingPolicy.setTimeBasedFileNamingAndTriggeringPolicy(stFNATP);
Is this the accepted approach to get simple roll-over each day with an additional max file size property?
Chris,
To help troubleshoot rollover issues, you can enable logback debug statements with:
LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
// Enable debugging to show rollover status
OnConsoleStatusListener.addNewInstanceToContext(context);
This will print any status messages when logback attempts to rollover the file.
See the working example that demonstrates the RollingFileAppender:
Tony
_______________________________________________
Logback-user mailing list
Logback-user@qos.ch
http://mailman.qos.ch/mailman/listinfo/logback-user