title: delete log file in runtime and slf4j+logback don't create it again
body: <p>I using <code>SLF4J</code> + <code>Logback</code> as logging infrastructure in my application.
  <code>logback.xml</code> has following content in my app:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &lt;configuration scan="true" scanPeriod="5 seconds"&gt;
      &lt;jmxConfigurator /&gt;
      &lt;property name="DIR" value="${LOG_DATA_HOME}"/&gt;
      &lt;appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"&gt; 
          &lt;file&gt;${DIR}/loghome/last.log&lt;/file&gt; 
          &lt;rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"&gt; 
            &lt;fileNamePattern&gt;${DIR}/loghome/log-%d{yyyy-MM-dd}.%i.log&lt;/fileNamePattern&gt; 
            &lt;timeBasedFileNamingAndTriggeringPolicyclass="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"&gt; 
                 &lt;maxFileSize&gt;10MB&lt;/maxFileSize&gt; 
            &lt;/timeBasedFileNamingAndTriggeringPolicy&gt; 
          &lt;/rollingPolicy&gt; 
          &lt;encoder&gt;
            &lt;pattern&gt;%-5level %date- %X{_diagKey} - %logger - %msg %n &lt;/pattern&gt;
          &lt;/encoder&gt;
      &lt;/appender&gt; 
      &lt;logger name="net.sf.ehcache" additivity="false"&gt;
          &lt;level value="error" /&gt;
          &lt;appender-ref ref="FILE" /&gt;
      &lt;/logger&gt;
      &lt;root level="error"&gt;
          &lt;appender-ref ref="FILE" /&gt;
      &lt;/root&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>My application running in linux suse and <code>JRE 1.6</code>.</p>
  
  <p>My question is: I deleted all log files(contain last file) from file system in times interval(for several reasons such as restriction of physical memory and etc) when my app running, but my app don't create log files again while I restart my app.</p>
  
  <p>Anyone knows reasons of above behavior and solution for it?</p>
  
  <p><strong>EDITED</strong>
  I get more detail by <code>OnConsoleStatusListener</code> of logbak:</p>
  
  <pre><code>11:00:33,640 |-ERROR in c.q.l.c.recovery.ResilientFileOutputStream@17459938 - IO failure while writing to file [\loghome\last.log] java.io.IOException: The handle is invalid
      at java.io.IOException: The handle is invalid
      at  at java.io.FileOutputStream.writeBytes(Native Method)
      at  at java.io.FileOutputStream.write(FileOutputStream.java:260)
      at  at ch.qos.logback.core.recovery.ResilientOutputStreamBase.write(ResilientOutputStreamBase.java:52)
      at  at java.io.OutputStream.write(OutputStream.java:58)
      at  at ch.qos.logback.core.encoder.LayoutWrappingEncoder.doEncode(LayoutWrappingEncoder.java:103)
      at  at ch.qos.logback.core.OutputStreamAppender.writeOut(OutputStreamAppender.java:193)
      at  at ch.qos.logback.core.FileAppender.writeOut(FileAppender.java:220)
      at  at ch.qos.logback.core.OutputStreamAppender.subAppend(OutputStreamAppender.java:217)
      at  at ch.qos.logback.core.OutputStreamAppender.append(OutputStreamAppender.java:108)
      at  at ch.qos.logback.core.UnsynchronizedAppenderBase.doAppend(UnsynchronizedAppenderBase.java:88)
      at  at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:64)
      at  at ch.qos.logback.classic.Logger.appendLoopOnAppenders(Logger.java:285)
      at  at ch.qos.logback.classic.Logger.callAppenders(Logger.java:272)
      at  at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:473)
      at  at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:427)
      at  at ch.qos.logback.classic.Logger.debug(Logger.java:534)
      at  at Test.main(Test.java:17)
  </code></pre>