[logback-dev] [JIRA] Created: (LBCORE-195) TimeBasedRollingPolicy doesn't delegate life-cycle events

Juergen Hermann (JIRA) noreply-jira at qos.ch
Wed Feb 9 13:20:51 CET 2011

TimeBasedRollingPolicy doesn't delegate life-cycle events

                 Key: LBCORE-195
                 URL: http://jira.qos.ch/browse/LBCORE-195
             Project: logback-core
          Issue Type: Bug
          Components: Rolling
    Affects Versions: 0.9.27
         Environment: Bug is also in the GIT head revision.
            Reporter: Juergen Hermann
            Assignee: Logback dev list

In ch.qos.logback.core.rolling, both TimeBasedRollingPolicy and TimeBasedFileNamingAndTriggeringPolicy support the LifeCycle interface, and the former aggregates the latter.

What TimeBasedRollingPolicy fails to do is to delegate the stop() event to its timeBasedFileNamingAndTriggeringPolicy object (it actually has no own stop() currently). This causes resource management problems in my use case, because my stop() is never called.

Fix: Add this to ./logback-core/src/main/java/ch/qos/logback/core/rolling/TimeBasedRollingPolicy.java

     * {@inheritDoc}
    public void stop() {
        if (timeBasedFileNamingAndTriggeringPolicy != null) {

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