title: ERROR StatusLogger Log4j2 could not find a logging implementation
body: <p>I am trying to implement <strong>log4j 2</strong> but it keeps throwing the following error.</p>
  
  <pre><code>&gt; ERROR StatusLogger Log4j2 could not find a logging implementation.
  &gt; Please add log4j-core to the classpath. Using SimpleLogger to log to
  &gt; the console...  
  &gt; ERROR LogExample This Will Be Printed On Error 
  &gt; FATAL LogExample This Will Be Printed On Fatal
  </code></pre>
  
  <p>I have tried the solution given on the net. But the don't seem to be working for me.</p>
  
  <p>This is the <strong>code</strong> that I am trying to run.</p>
  
  <pre><code>package demo;
  
  import org.apache.logging.log4j.LogManager;
  import org.apache.logging.log4j.Logger;
  
  public class LogExample {
  
      private static final Logger LOG = LogManager.getLogger(LogExample.class);
  
      public static void main(String[] args) {
  
          LOG.debug("This Will Be Printed On Debug");
          LOG.info("This Will Be Printed On Info");
          LOG.warn("This Will Be Printed On Warn");
          LOG.error("This Will Be Printed On Error");
          LOG.fatal("This Will Be Printed On Fatal");
          LOG.info("Appending string: {}.", "Hello, World");
      }
  
  }
  </code></pre>
  
  <p><strong>Project and dependency added in the pom.xml:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/CIlRB.png" rel="noreferrer"><img src="https://i.stack.imgur.com/CIlRB.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/iJYKy.png" rel="noreferrer"><img src="https://i.stack.imgur.com/iJYKy.png" alt="enter image description here"></a></p>
  
  <p>Any help is appreciated.</p>