title: LogBack generating weird files :/
body: <p>I like <code>LogBack</code>, seriously I do!</p>
  
  <p>I configured it in a way that most of the times produces log files with the following structure:</p>
  
  <pre><code>+ logs
      - latestRun.log
      + rolled
        - logFile_2012-03-09T03.log 
        - logFile_2012-03-09T04.log
        - etc...
  </code></pre>
  
  <p>The structure above makes me very happy! (Sometimes the content does not but this is another issue)</p>
  
  <p>Occasionally, I end up with files like this though:</p>
  
  <pre><code>+ logs
      - latestRun.log
      - latestRun.log1998071534195169.tmp
      - latestRun.log2016071527094180.tmp
      - etc...
      + rolled
        - logFile_2012-03-09T03.log 
        - logFile_2012-03-09T04.log
        - etc...
  </code></pre>
  
  <p>Now those <code>.tmp</code> files are a pain in the neck and I really cannot explain why they are generated. The issue seems to be more frequent when I add the <code>.gz</code> in the <code>&lt;fileNamePattern&gt;</code> for compressing the rolled files.</p>
  
  <p>This is how my appender is configured in my <code>logback.xml</code> file:</p>
  
  <pre><code>&lt;property name="LOGS_FOLDER" value="logs/" /&gt;
  
  &lt;appender name="ROLLINGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender"&gt;
      &lt;file&gt;${LOGS_FOLDER}latestRun.log&lt;/file&gt;
      &lt;rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"&gt;
          &lt;!-- daily rollover --&gt;
          &lt;fileNamePattern&gt;${LOGS_FOLDER}rolled/logFile_%d{yyyy-MM-dd'T'HH}.log.gz&lt;/fileNamePattern&gt;
          &lt;!-- keep 30 days' worth of history --&gt;
          &lt;maxHistory&gt;30&lt;/maxHistory&gt;
      &lt;/rollingPolicy&gt;
  
      &lt;encoder&gt;
          &lt;pattern&gt;%-4relative [%thread] %-5level %logger{35} - %msg%n&lt;/pattern&gt;
      &lt;/encoder&gt;
  &lt;/appender&gt;
  </code></pre>
  
  <p>The environment is <code>Linux Ubuntu</code></p>