title: Can I make log4j use the configuration in my resources folder?
body: <p>Getting log4j to work is way more complicated than advertised. I keep getting this error:</p>
  
  <pre><code>ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
  </code></pre>
  
  <p>I have tried to put my <code>log4j.xml</code> file all over the place, but what I want it is to have it in my <code>/resources</code> folder. In my <code>pom.xml</code>, these paths are defined:</p>
  
  <pre><code>  &lt;properties&gt;
      &lt;src.dir&gt;src/&lt;/src.dir&gt;
      &lt;test.dir&gt;test/&lt;/test.dir&gt;
      &lt;resource.dir&gt;resources/&lt;/resource.dir&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
    &lt;/properties&gt;
    &lt;build&gt;
      &lt;testSourceDirectory&gt;${test.dir}&lt;/testSourceDirectory&gt;
      &lt;sourceDirectory&gt;${src.dir}&lt;/sourceDirectory&gt;
      &lt;resources&gt;
        &lt;resource&gt;
          &lt;directory&gt;${resource.dir}&lt;/directory&gt;
        &lt;/resource&gt;
      &lt;/resources&gt;
      ... long list of plugins coming, let's cut it off.
  </code></pre>
  
  <p>All resources that are in the <code>resources</code> directory are accessible from the <code>.jar</code>. There are images and icons, all working. But Log4j ignores the configuration file.</p>
  
  <p>So how can I tell it where the file is and finally start actually learning to use it?</p>