title: Unable to initialize Log4j - SLF4JLoggerContextFactory
body: <p>I have a jetty webapp running with log4j2.
  It is not logging anything and there is the following error on startup:</p>
  
  <p>ERROR StatusLogger LogManager returned an instance of org.apache.logging.slf4j.SLF4JLoggerContextFactory which does not implement org.apache.logging.log4j.core.impl.Log4jContextFactory. Unable to initialize Log4j.</p>
  
  <p><strong>My logging code:</strong></p>
  
  <pre><code>org.apache.logging.log4j.Logger logger = org.apache.logging.log4j.LogManager.getLogger(MyClass.class);
  logger.info("something");
  </code></pre>
  
  <p><strong>log4j2.xml:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Configuration status="WARN"&gt;
      &lt;Properties&gt;
          &lt;property name="layout.pattern"&gt;%d %5p %c{1.} [%t] %m%n&lt;/property&gt;
      &lt;/Properties&gt;
  
      &lt;Appenders&gt;
          &lt;Console name="consoleAppender"&gt;
              &lt;PatternLayout pattern="${layout.pattern}" /&gt;
          &lt;/Console&gt;
  
          &lt;RollingFile name="rollingFileAppender"&gt;
              &lt;FileName&gt;logs/app.log&lt;/FileName&gt;
              &lt;FilePattern&gt;logs/%d{yyyy-MM-dd}-app.log&lt;/FilePattern&gt;
              &lt;PatternLayout pattern="${layout.pattern}" /&gt;
              &lt;Policies&gt;
                  &lt;TimeBasedTriggeringPolicy /&gt;
                  &lt;SizeBasedTriggeringPolicy size="250 MB" /&gt;
              &lt;/Policies&gt;
              &lt;DefaultRolloverStrategy fileIndex="nomax" /&gt;
          &lt;/RollingFile&gt;
      &lt;/Appenders&gt;
  
      &lt;Loggers&gt;
          &lt;Root level="info"&gt;
              &lt;AppenderRef ref="consoleAppender" /&gt;
          &lt;/Root&gt;
          &lt;Logger name="com.app" level="all"
              additivity="false"&gt;
              &lt;AppenderRef ref="consoleAppender" /&gt;
              &lt;AppenderRef ref="rollingFileAppender" /&gt;
          &lt;/Logger&gt;
      &lt;/Loggers&gt;
  &lt;/Configuration&gt;
  </code></pre>
  
  <p>What is wrong?</p>