title: How to fix "No Log4j 2 configuration file found" in Netbeans?
body: <p>I am trying to configure Log4j2 in Netbeans. </p>
  
  <p>I have used following code:</p>
  
  <pre><code>import org.apache.logging.log4j.LogManager;
  import org.apache.logging.log4j.Logger;
  public class App
  {
      public static void main( String[] args ) {
          Logger logger = LogManager.getRootLogger();
          logger.trace("Configuration File Defined To Be :: "+System.getProperty("log4j.configurationFile"));
      }
  }
  </code></pre>
  
  <p>When i right click and run i am getting following error message:</p>
  
  <pre><code>ERROR StatusLogger No Log4j 2 configuration file found. Using default configuration (logging only errors to the console), or user programmatically provided configurations. Set system property 'log4j2.debug' to show Log4j 2 internal initialization logging. See https://logging.apache.org/log4j/2.x/manual/configuration.html for instructions on how to configure Log4j 2
  BUILD SUCCESSFUL (total time: 2 seconds)
  </code></pre>
  
  <p>currently, My project structure looks like below: (Netbeans project)</p>
  
  <p><a href="https://i.stack.imgur.com/BP6aY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BP6aY.png" alt="enter image description here"></a></p>
  
  <p>As suggested by related questioners, I am trying to make src/main/resources and put configuration file under same and also tried to put it under src(source packages) but unable to fix that error. Kindly help me.</p>