title: Log4j2 configuration - No log4j2 configuration file found
body: <p>Lately I decided to learn how to use the log4j2 logger. I downloaded required jar files, created library, xml comfiguration file and tried to use it. Unfortunately i get this statement in console (Eclipse) : </p>
  
  <pre><code>ERROR StatusLogger No log4j2 configuration file found. Using default configuration:       logging only errors to the console.
  </code></pre>
  
  <p>This is my testing class code:</p>
  
  <pre><code>package log4j.test;
  
  import org.apache.logging.log4j.LogManager;
  import org.apache.logging.log4j.Logger;
  
  public class Log4jTest
  {
      static final Logger logger = LogManager.getLogger(Logger.class.getName());
  
      public static void main(String[] args) {    
          logger.trace("trace");
          logger.debug("debug");
          logger.info("info");
          logger.warn("warn");
          logger.error("error");
          logger.fatal("fatal");
      }
  }
  </code></pre>
  
  <p>And my xml config file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Configuration package="log4j.test" 
                 status="WARN"&gt;
      &lt;Appenders&gt;
          &lt;Console name="Console" target="SYSTEM_OUT"&gt;
              &lt;PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/&gt;
          &lt;/Console&gt;
      &lt;/Appenders&gt;
      &lt;Loggers&gt;
          &lt;Logger name="log4j.test.Log4jTest" level="trace"&gt;
              &lt;AppenderRef ref="Console"/&gt;
          &lt;/Logger&gt;
          &lt;Root level="trace"&gt;
              &lt;AppenderRef ref="Console"/&gt;
          &lt;/Root&gt;
      &lt;/Loggers&gt;
  &lt;/Configuration&gt;
  </code></pre>
  
  <p>I tried also with xml without <code>&lt;Logger&gt;</code> tags, and package specification and in various folders/packages directories, but it didn't help. Now my <code>log4j2.xml</code> file is located directly in project folder in eclipse.</p>