title: Overriding logback configurations
body: <p>Is there any way that we can override the logback configurations? I know that we define the logback configurations in file named <code>logback.xml</code> (usually stored in the path <code>src/main/resources</code>) and I know that by using <code>&lt;include&gt;</code> tag we can set an external file to be added to <code>logback.xml</code> just like below:</p>
  
  <pre><code>&lt;configuration&gt;
  
  &lt;!--&lt;include url="file:///d:/ServerConfig.xml"/&gt;--&gt;
  &lt;include file="${outPut}/ServerConfig.xml"/&gt;
  
  
  &lt;logger name="Server" LEVEL="DEBUG"&gt;
      &lt;appender-ref ref="FILEOUT" /&gt;
  &lt;/logger&gt;
  
  &lt;root level="DEBUG"&gt;
      &lt;appender-ref ref="STDOUT" /&gt;
      &lt;!--&lt;appender-ref ref="FILEOUT" /&gt;--&gt;
  &lt;/root&gt;
  
  &lt;/configuration&gt;
  </code></pre>
  
  <p>But what if I want to override this default configuration? For example set the root logger level to INFO.</p>
  
  <p>Here is the included file:</p>
  
  <pre><code>&lt;included&gt;
  
  &lt;!-- &lt;property file="d:/ServerSysVar.properties"/&gt;--&gt;
  &lt;property file="${outPut}/ServerSysVar.properties"/&gt;
  
  
  &lt;appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"&gt;
      &lt;!-- encoders are assigned the type
           ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --&gt;
      &lt;encoder&gt;
          &lt;pattern&gt;%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n&lt;/pattern&gt;
      &lt;/encoder&gt;
  &lt;/appender&gt;
  
  
  
  &lt;appender name="FILEOUT" class="ch.qos.logback.core.FileAppender"&gt;
      &lt;file&gt;${Sys_Location}/Serverfile4.log&lt;/file&gt;
      &lt;!-- encoders are assigned the type
           ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --&gt;
      &lt;encoder&gt;
          &lt;pattern&gt;%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} %class{36}.%M %L CLIENT_PORT:%X{ClientPort}- %msg%n&lt;/pattern&gt;
      &lt;/encoder&gt;
  &lt;/appender&gt;
  
  
  &lt;logger name="Service" LEVEL="DEBUG"&gt;
      &lt;appender-ref ref="FILEOUT" /&gt;
  &lt;/logger&gt;
  
   &lt;root&gt;
      &lt;appender-ref ref="STDOUT" /&gt;
     &lt;!-- &lt;appender-ref ref="FILEOUT" /&gt;--&gt;
  &lt;/root&gt;
  
  &lt;/included&gt;
  </code></pre>