title: Logging system failed to initialize using configuration from 'null' java.lang.IllegalStateException: Logback configuration error detected:
body: <p>I want to use a common xml in my logback-spring.xml? how to include the xml in logback-spring.xml without getting an error. I got that to include an xml in our logback-spring.xml we need to use  but somehow this is not working for me. I have invested so much time but no results.
  <a href="https://dennis-xlc.gitbooks.io/the-logback-manual/content/en/chapter-3-configuration/configuration-file-syntax/file-inclusion.html" rel="nofollow noreferrer">https://dennis-xlc.gitbooks.io/the-logback-manual/content/en/chapter-3-configuration/configuration-file-syntax/file-inclusion.html</a></p>
  <p>logback-common.xml</p>
  <pre><code> &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;configuration&gt;
      &lt;include resource=&quot;org/springframework/boot/logging/logback/defaults.xml&quot;/&gt;
      &lt;include resource=&quot;org/springframework/boot/logging/logback/base.xml&quot;/&gt;
      &lt;include resource=&quot;org/springframework/boot/logging/logback/console-appender.xml&quot;/&gt;
      &lt;property name=&quot;LOGS&quot; value=&quot;./logs&quot; /&gt;
      &lt;appender name=&quot;Console&quot;
          class=&quot;ch.qos.logback.core.ConsoleAppender&quot;&gt;
          &lt;layout class=&quot;ch.qos.logback.classic.PatternLayout&quot;&gt;
              &lt;Pattern&gt;
                  %black(%d{ISO8601}) %highlight(%-5level) [%blue(%t)] %yellow(%C{1.}): %msg%n%throwable
              &lt;/Pattern&gt;
          &lt;/layout&gt;
      &lt;/appender&gt;
  
      &lt;appender name=&quot;RollingFile&quot;
          class=&quot;ch.qos.logback.core.rolling.RollingFileAppender&quot;&gt;
          &lt;file&gt;${LOGS}/${NAME}.log&lt;/file&gt;
          &lt;encoder
              class=&quot;ch.qos.logback.classic.encoder.PatternLayoutEncoder&quot;&gt;
              &lt;Pattern&gt;%d %p %C{1.} [%t] %m%n&lt;/Pattern&gt;
          &lt;/encoder&gt;
  
          &lt;rollingPolicy
              class=&quot;ch.qos.logback.core.rolling.TimeBasedRollingPolicy&quot;&gt;
              &lt;!-- rollover daily and when the file reaches 10 MegaBytes --&gt;
              &lt;fileNamePattern&gt;${LOGS}/archived/spring-boot-logger-%d{yyyy-MM-dd}.%i.log
              &lt;/fileNamePattern&gt;
              &lt;timeBasedFileNamingAndTriggeringPolicy
                  class=&quot;ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP&quot;&gt;
                  &lt;maxFileSize&gt;10MB&lt;/maxFileSize&gt;
              &lt;/timeBasedFileNamingAndTriggeringPolicy&gt;
          &lt;/rollingPolicy&gt;
      &lt;/appender&gt;
      
  
      &lt;root level=&quot;info&quot;&gt;
          &lt;appender-ref ref=&quot;RollingFile&quot; /&gt;
          &lt;appender-ref ref=&quot;Console&quot; /&gt;
      &lt;/root&gt;
  
  
      &lt;logger name=&quot;com.ms&quot; level=&quot;trace&quot; additivity=&quot;false&quot;&gt;
          &lt;appender-ref ref=&quot;RollingFile&quot; /&gt;
          &lt;appender-ref ref=&quot;Console&quot; /&gt;
      &lt;/logger&gt;
      
      &lt;logger name=&quot;org.springframework.core.env.PropertySourcesPropertyResolver&quot; level=&quot;trace&quot; additivity=&quot;true&quot;&gt;
      &lt;/logger&gt;
  </code></pre>
  
  <p>logback-spring.xml</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;configuration scan = &quot;true&quot;&gt;
      &lt;property resource =&quot;application.yml&quot;/&gt;
      &lt;springProperty name=&quot;NAME&quot; source=&quot;spring.application.name&quot; /&gt; 
      &lt;include resource=&quot;logback-common.xml&quot;/&gt;
  &lt;/configuration&gt;
  </code></pre>
  <p>application.yml</p>
  <pre><code>spring:
    application:
      name: Logbacking-service
  </code></pre>