title: Spring errors and warning not coming in logs when dependency of both logback and log4j is there
body: <p>I have a spring boot application where logback is used along with sl4j. Its logging everything perfectly but if some error comes at time of service startup like BeanInitializationException then that is not coming up in console.</p>
  
  <p>I checked the dependency tree then found that log4j jar is also present so i excluded it in perception that problem might be because of conflicts between logback and log4j. But now some third party jar is asking for log4j.</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.owasp.esapi&lt;/groupId&gt;
          &lt;artifactId&gt;esapi&lt;/artifactId&gt;
          &lt;version&gt;${org.owasp.esapi.version}&lt;/version&gt;
          &lt;exclusions&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;log4j&lt;/groupId&gt;
                  &lt;artifactId&gt;log4j&lt;/artifactId&gt;
              &lt;/exclusion&gt;
          &lt;/exclusions&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>this error i am getting</p>
  
  <pre><code>20-08-2019 12:39:46.117 [main] WARN  o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext.log - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'connectorController': Unsatisfied dependency expressed through field 'connectorService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'connectorService': Unsatisfied dependency expressed through field 'concurConnector'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'getConcurConnector' defined in class path resource [com/oversighttech/application/config/ConnectorConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.oversighttech.Concur.ConcurConnector]: Factory method 'getConcurConnector' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/log4j/Logger
  </code></pre>