title: Rolling LogBack - Failed to create parent directories for: [c:\var...]
body: <p>I just cloned this project, did the maven update, but I'm not able to run the log. And as I have a problem accessing the database, I need to know what's going on, but I can't create the log</p>
  
  <p>through the log file it should automatically create, or not?</p>
  
  <p>Apparently the system cannot find the file where the log should be.</p>
  
  <p>How could I solve this:</p>
  
  <pre><code>&lt;configuration&gt;
    &lt;appender name="console" class="ch.qos.logback.core.ConsoleAppender"&gt;
       &lt;encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"&gt;
           &lt;pattern&gt;%d{yyyy-MM-dd HH:mm:ss} %p [%c] - %m%n&lt;/pattern&gt;
       &lt;/encoder&gt;
   &lt;/appender&gt;
  
   &lt;appender name="fileLogger" 
   class="ch.qos.logback.core.rolling.RollingFileAppender"&gt;
      &lt;Append&gt;true&lt;/Append&gt;
  
      &lt;File&gt;/var/log/app-logs/app.log&lt;/File&gt;
  
      &lt;encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"&gt;
          &lt;pattern&gt;%d{yyyy-MM-dd HH:mm:ss} %p [%c] - %m%n&lt;/pattern&gt;
      &lt;/encoder&gt;
  
      &lt;rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"&gt;
          &lt;maxIndex&gt;50&lt;/maxIndex&gt;
          &lt;FileNamePattern&gt;/var/log/app-logs/app.log.%i&lt;/FileNamePattern&gt;
      &lt;/rollingPolicy&gt;
  
      &lt;triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"&gt;
          &lt;MaxFileSize&gt;20MB&lt;/MaxFileSize&gt;
      &lt;/triggeringPolicy&gt;
  &lt;/appender&gt;
  
  &lt;logger name="br.com.teste.searchio" level="debug"&gt;
      &lt;appender-ref ref="console"/&gt;
      &lt;appender-ref ref="fileLogger"/&gt;
  &lt;/logger&gt;
  
  &lt;logger name="br.com.teste.searchio.domain.ItemDemanda" level="debug"&gt;
      &lt;appender-ref ref="console"/&gt;
      &lt;appender-ref ref="fileLogger"/&gt;
  &lt;/logger&gt;
  
  &lt;logger name="br.com.teste.searchio.external.presentation.web.struts.FluxoDadosAction" level="trace"&gt;
      &lt;appender-ref ref="console"/&gt;
      &lt;appender-ref ref="fileLogger"/&gt;
  &lt;/logger&gt;
  
  &lt;logger name="br.com.teste.searchio.external.presentation.web.WorkflowCompraTela" level="trace"&gt;
      &lt;appender-ref ref="console"/&gt;
      &lt;appender-ref ref="fileLogger"/&gt;
  &lt;/logger&gt;
  
  &lt;root level="warn"&gt;
      &lt;appender-ref ref="console"/&gt;
      &lt;appender-ref ref="fileLogger"/&gt;
  &lt;/root&gt;
  
  &lt;contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator"&gt;
      &lt;!-- reset all previous level configurations of all j.u.l. loggers --&gt;
      &lt;resetJUL&gt;true&lt;/resetJUL&gt;
  &lt;/contextListener&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>14:34:03,889 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
  14:34:03,890 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
  14:34:03,891 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/C:/Users/bwm6/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/localizae_/WEB-INF/classes/logback.xml]
  14:34:04,042 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
  14:34:04,049 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
  14:34:04,077 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [console]
  14:34:04,204 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
  14:34:04,214 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [fileLogger]
  14:34:04,238 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@4f8c8136 - No compression will be used
  14:34:04,239 |-WARN in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@4f8c8136 - Large window sizes are not allowed.
  14:34:04,239 |-WARN in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@4f8c8136 - MaxIndex reduced to 21
  14:34:04,248 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[fileLogger] - Active log file name: /var/log/app-logs/app.log
  14:34:04,248 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[fileLogger] - File property is set to [/var/log/app-logs/app.log]
  14:34:04,253 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[fileLogger] - Failed to create parent directories for [C:\var\log\app-logs\app.log]
  14:34:04,255 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[fileLogger] - openFile(/var/log/app-logs/app.log,true) call failed. java.io.FileNotFoundException: \var\log\app-logs\app.log (O sistema não pode encontrar o caminho especificado)
      at java.io.FileNotFoundException: \var\log\app-logs\app.log (O sistema não pode encontrar o caminho especificado)
      at  at java.io.FileOutputStream.open0(Native Method)
      at  at java.io.FileOutputStream.open(Unknown Source)
      at  at java.io.FileOutputStream.&lt;init&gt;(Unknown Source)
      at  at ch.qos.logback.core.recovery.ResilientFileOutputStream.&lt;init&gt;(ResilientFileOutputStream.java:26)
      at  at ch.qos.logback.core.FileAppender.openFile(FileAppender.java:204)
      at  at ch.qos.logback.core.FileAppender.start(FileAppender.java:127)
      at  at ch.qos.logback.core.rolling.RollingFileAppender.start(RollingFileAppender.java:100)
  </code></pre>