title: ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console
body: <p>I am trying to use log4j2 in my Ant build.xml to create executable .jar. The jar works fine but it seems like log4j2.xml is not being recognized. I currently have the file under src folder. and have classpath set in my build.xml as below. This happens for all my projects. What would be the proper directory to put log4j2.xml? Is there something other than adding it to classpath in build.xml to do?</p>
  
  <pre><code>    &lt;path id = "classpath"&gt;  
      &lt;pathelement location="${junitJar}/junit-4.11.jar"/&gt; 
      &lt;pathelement location="${junitJar}/hamcrest-core-1.3.jar" /&gt;
      &lt;pathelement location="${classes.dir}"/&gt;  
      &lt;pathelement location="${log4jJar}/log4j-api-2.1.jar" /&gt;
      &lt;pathelement location="${log4jJar}/log4j-core-2.1.jar" /&gt;
      &lt;pathelement location="${src.dir}/log4j2.xml" /&gt;
  &lt;/path&gt;      
  
  
  compile:
  jar:
  run:
   [java] ERROR StatusLogger No log4j2 configuration file found. Using default         configuration: logging only errors to the console.
   [java] Hello World!
  main:
  BUILD SUCCESSFUL
  Total time: 1 second
  </code></pre>