title: if condition in logback - print log messages in two different folders
body: <p>I am writing code for log messages in two different folders with the same log level.the problem i am facing is with the below code am not able to print the log messages on conditional(when it becomes else).Mainly the else part is not working.</p>
  
  <p>In simple terms how to write the logs in two different folders based on If else condition using two different appenders.</p>
  
  <p>the code is : </p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;if condition='property("type").contains("DEV")'&gt;
      &lt;then&gt;
          &lt;appender-ref ref="FILE-ENGINE" /&gt;
      &lt;/then&gt;
      &lt;else&gt;
          &lt;appnder-ref ref = "FILE-UI" /&gt;
      &lt;/else&gt;
  &lt;/if&gt;
  </code></pre>
  
  <p>The entire configuration file is :</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;configuration&gt;
  
      &lt;property name="USER_HOME" value="D:/Log1/" /&gt;
  
      &lt;property name="USER_HOME2" value="D:/log2/" /&gt;
  
  
      &lt;if condition='property("type").contains("DEV")'&gt;
          &lt;then&gt;
              &lt;appender-ref ref="FILE-ENGINE" /&gt;
          &lt;/then&gt;
          &lt;else&gt;
              &lt;appnder-ref ref = "FILE-UI" /&gt;
          &lt;/else&gt;
      &lt;/if&gt;
  
  
      &lt;appender name="FILE-ENGINE" class="ch.qos.logback.core.FileAppender"&gt;
          &lt;file&gt;${USER_HOME}/${log.name}.log&lt;/file&gt;
          &lt;append&gt;true&lt;/append&gt;
          &lt;encoder&gt;
              &lt;pattern&gt;%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{35} -
                  %msg%n&lt;/pattern&gt;
          &lt;/encoder&gt;
      &lt;/appender&gt;
  
      &lt;appender name="FILE-UI" class="ch.qos.logback.core.FileAppender"&gt;
          &lt;file&gt;${USER_HOME2}/DEBUG.log&lt;/file&gt;
          &lt;append&gt;true&lt;/append&gt;
          &lt;encoder&gt;
              &lt;pattern&gt;%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{35} -
                  %msg%n&lt;/pattern&gt;
          &lt;/encoder&gt;
      &lt;/appender&gt;
  
  
      &lt;appender name="FILE-ENGINE-ERROR" class="ch.qos.logback.core.FileAppender"&gt;
          &lt;file&gt;${USER_HOME}/${log.name}.error&lt;/file&gt;
          &lt;append&gt;true&lt;/append&gt;
          &lt;encoder&gt;
              &lt;pattern&gt;%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} -
                  %msg%n&lt;/pattern&gt;
          &lt;/encoder&gt;
      &lt;/appender&gt;
  
  
      &lt;logger name="com.code" level="debug" additivity="false"&gt;
          &lt;appender-ref ref="FILE-ENGINE" /&gt;
          &lt;appender-ref ref="FILE-UI" /&gt;
  
      &lt;/logger&gt;
  
      &lt;root level="Error"&gt;
          &lt;appender-ref ref="FILE-ENGINE-ERROR" /&gt;
      &lt;/root&gt;
  
  &lt;/configuration&gt;
  </code></pre>
  
  <p>pls help me how to write the logs with else condition. Thanks in Advance.</p>