title: SpringBoot with LogBack creating LOG_PATH_IS_UNDEFINED folder
body: <p>I am using SpringBoot with LogBack and using the below configuration in my yml file:</p>
  
  <pre><code>logging:
      path: C:/var/log/pincode
  </code></pre>
  
  <p>The logging.path Spring Environment Variable is transferred to the LOG_PATH Environment variable and the log file is placed at the correct place, but there is also a directory called LOG_PATH_IS_UNDEFINED created in the root directory of my project.</p>
  
  <p>This seems to be caused by the different phase used by SpringBoot to configure LogBack with its Environment variables.</p>
  
  <pre><code>17:29:21,325 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
  17:29:21,337 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Will use the pattern LOG_PATH_IS_UNDEFINED/catalina.out.%d{yyyy-MM-dd} for the active file
  17:29:21,340 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - The date pattern is 'yyyy-MM-dd' from file name pattern 'LOG_PATH_IS_UNDEFINED/catalina.out.%d{yyyy-MM-dd}'.
  17:29:21,340 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Roll-over at midnight.
  17:29:21,343 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Setting initial period to Mon Aug 11 17:24:07 BRT 2014
  17:29:21,346 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[serverConsole] - Active log file name: LOG_PATH_IS_UNDEFINED/catalina.out
  17:29:21,346 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[serverConsole] - File property is set to [LOG_PATH_IS_UNDEFINED/catalina.out]
  ...
  17:29:21,358 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
  </code></pre>
  
  <p>And then after that it start configuring logback again but this time using the path i set:</p>
  
  <pre><code>17:29:21,672 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
  17:29:21,673 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - No compression will be used
  17:29:21,673 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Will use the pattern C:/var/log/pincode//catalina.out.%d{yyyy-MM-dd} for the active file
  17:29:21,674 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - The date pattern is 'yyyy-MM-dd' from file name pattern 'C:/var/log/pincode//catalina.out.%d{yyyy-MM-dd}'.
  17:29:21,674 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Roll-over at midnight.
  17:29:21,674 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Setting initial period to Mon Aug 11 17:29:21 BRT 2014
  17:29:21,674 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[serverConsole] - Active log file name: C:/var/log/pincode//catalina.out
  17:29:21,674 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[serverConsole] - File property is set to [C:/var/log/pincode//catalina.out]
  ...
  17:29:21,685 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
  </code></pre>
  
  <p>My logback.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;configuration debug="true"&gt;
  &lt;include resource="org/springframework/boot/logging/logback/basic.xml" /&gt;
  &lt;property name="FILE_LOG_PATTERN"
      value="%d{yyyy-MM-dd HH:mm:ss.SSS} %5p ${PID:- } [%t] --- %-40.40logger{39} : %m%n%wex" /&gt;
  
  &lt;appender name="serverConsole"
            class="ch.qos.logback.core.rolling.RollingFileAppender"&gt;
      &lt;Append&gt;true&lt;/Append&gt;
      &lt;File&gt;${LOG_PATH}/catalina.out&lt;/File&gt;
      &lt;encoder&gt;
          &lt;pattern&gt;${FILE_LOG_PATTERN}&lt;/pattern&gt;
      &lt;/encoder&gt;
      &lt;rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"&gt;
          &lt;fileNamePattern&gt;${LOG_PATH}/catalina.out.%d{yyyy-MM-dd}
          &lt;/fileNamePattern&gt;
          &lt;maxHistory&gt;15&lt;/maxHistory&gt;
      &lt;/rollingPolicy&gt;
  &lt;/appender&gt;
  
  &lt;!-- Plain Text Rolling Appender --&gt;
  &lt;appender name="server"
      class="ch.qos.logback.core.rolling.RollingFileAppender"&gt;
      &lt;Append&gt;true&lt;/Append&gt;
      &lt;File&gt;${LOG_PATH}/pincode.log&lt;/File&gt;
      &lt;filter class="ch.qos.logback.classic.filter.LevelFilter"&gt;
          &lt;level&gt;INFO&lt;/level&gt;
          &lt;onMatch&gt;ACCEPT&lt;/onMatch&gt;
          &lt;onMismatch&gt;DENY&lt;/onMismatch&gt;
      &lt;/filter&gt;
      &lt;encoder&gt;
          &lt;pattern&gt;${FILE_LOG_PATTERN}&lt;/pattern&gt;
      &lt;/encoder&gt;
      &lt;rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"&gt;
          &lt;fileNamePattern&gt;${LOG_PATH}/pincode.log.%d{yyyy-MM-dd}
          &lt;/fileNamePattern&gt;
          &lt;maxHistory&gt;15&lt;/maxHistory&gt;
      &lt;/rollingPolicy&gt;
  &lt;/appender&gt;
  
  &lt;!-- Plain Text Rolling Appender --&gt;
  &lt;appender name="server-error"
      class="ch.qos.logback.core.rolling.RollingFileAppender"&gt;
      &lt;Append&gt;true&lt;/Append&gt;
      &lt;File&gt;${LOG_PATH}/pincode-error.log&lt;/File&gt;
      &lt;filter class="ch.qos.logback.classic.filter.LevelFilter"&gt;
          &lt;level&gt;ERROR&lt;/level&gt;
          &lt;onMatch&gt;ACCEPT&lt;/onMatch&gt;
          &lt;onMismatch&gt;DENY&lt;/onMismatch&gt;
      &lt;/filter&gt;
      &lt;encoder&gt;
          &lt;pattern&gt;${FILE_LOG_PATTERN}&lt;/pattern&gt;
      &lt;/encoder&gt;
      &lt;rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"&gt;
          &lt;fileNamePattern&gt;${LOG_PATH}/pincode-error.log.%d{yyyy-MM-dd}
          &lt;/fileNamePattern&gt;
          &lt;maxHistory&gt;15&lt;/maxHistory&gt;
      &lt;/rollingPolicy&gt;
  &lt;/appender&gt;
  
  &lt;logger name="com.app" level="INFO"&gt;
      &lt;appender-ref ref="server" /&gt;
      &lt;appender-ref ref="server-error" /&gt;
  &lt;/logger&gt;
  
  &lt;root level="INFO"&gt;
      &lt;appender-ref ref="serverConsole" /&gt;
  &lt;/root&gt; 
  </code></pre>
  
  <p></p>
  
  <p>If I remove my logback.xml file from the project it doesn't create the folder, so somewhere Spring is loading the xml before parsing the yml?</p>
  
  <p>How can I avoid Logback to create this LOG_PATH_IS_UNDEFINED directory?</p>