Logback: SizeAndTimeBasedRollingPolicy not honoring totalSizeCap : <p>I'm trying to manage my logging in a way in which my oldest archived logfiles are deleted once they've either reached the total cumulative size limit or reached their maximum history limit.  When using the <code>SizeAndTimeBasedRollingPolicy</code>in Logback 1.1.7, the rolling file appender will keep creating new archives in spite of exceeding the <code>totalSizeCap</code> set.   </p>

<p>Here's my logback.xml file for reference:</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;configuration&gt;
    &lt;appender name="file"
        class="ch.qos.logback.core.rolling.RollingFileAppender"&gt;

        &lt;file&gt;${USERPROFILE}/testlogs/test.log&lt;/file&gt;

        &lt;rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"&gt;
            &lt;fileNamePattern&gt;
                ${USERPROFILE}/testlogs/%d{yyyy-MM-dd_HH}/test%i.log.zip
            &lt;/fileNamePattern&gt;
            &lt;maxHistory&gt;7&lt;/maxHistory&gt;
            &lt;maxFileSize&gt;50KB&lt;/maxFileSize&gt;
            &lt;totalSizeCap&gt;200KB&lt;/totalSizeCap&gt;
        &lt;/rollingPolicy&gt;

        &lt;encoder&gt;
            &lt;pattern&gt;%d{yyyy-MM-dd HH:mm:ss.SSS} %5p - %m%n&lt;/pattern&gt;
        &lt;/encoder&gt;

    &lt;/appender&gt;

    &lt;root level="INFO"&gt;
        &lt;appender-ref ref="file" /&gt;
    &lt;/root&gt;
&lt;/configuration&gt;
</code></pre>

<p>Is this a bug in logback or am I not configuring the rolling file appender correctly?</p>
