title: Rolling logback logs on filesize and time
body: <p>I've been trying to set up a simple logback project to roll my log files by date and by filesize, and so far I have been unable to get my appender to roll over to another file. Instead, it writes to the log specified by the &lt;file/&gt; tag.</p>
  
  <p>Here is my logback.xml configuration file:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration scan="true" scanPeriod="10 seconds"&gt;
      &lt;appender name="stdout" class="ch.qos.logback.core.ConsoleAppender"&gt;
          &lt;layout class="ch.qos.logback.classic.PatternLayout"&gt;
              &lt;pattern&gt;%d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n&lt;/pattern&gt;
          &lt;/layout&gt;
      &lt;/appender&gt;
  
      &lt;appender name="milliroller" class="ch.qos.logback.core.rolling.RollingFileAppender"&gt;
          &lt;file&gt;log/output.log&lt;/file&gt;
          &lt;layout class="ch.qos.logback.classic.PatternLayout"&gt;
              &lt;pattern&gt;%d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n&lt;/pattern&gt;
          &lt;/layout&gt;
          &lt;rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"&gt;
              &lt;fileNamePattern&gt;log/mylog-%d{yyyy-MM-dd}.%i.txt&lt;/fileNamePattern&gt;
              &lt;timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"&gt;
                  &lt;maxFileSize&gt;1KB&lt;/maxFileSize&gt;
              &lt;/timeBasedFileNamingAndTriggeringPolicy&gt;
          &lt;/rollingPolicy&gt;
      &lt;/appender&gt;
  
      &lt;root level="DEBUG"&gt;
          &lt;appender-ref ref="stdout"/&gt;
          &lt;appender-ref ref="milliroller"/&gt;
      &lt;/root&gt;
  
      &lt;logger name="com.tkassembled.logback" level="DEBUG"/&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>At first glance, it looks like it should work, right? Is there something I'm doing wrong? My entire, buildable project is available in a zip here: <a href="http://www.mediafire.com/file/2bxokkdyz2i/logback.zip" rel="noreferrer">http://www.mediafire.com/file/2bxokkdyz2i/logback.zip</a> </p>