title: log4j2 logging happening in the wrong path
body: <p>I have an ear deployed in weblogic with the log4j2.xml logPath set as </p>
  
  <pre><code>&lt;Property name="logPath"&gt;some_path_1&lt;Property&gt;
  </code></pre>
  
  <p>and a logger defined as </p>
  
  <pre><code>&lt;Logger name="a.b.c.d" level="INFO" /&gt;
  </code></pre>
  
  <p>Inside this ear/lib there is a jar containing a log4j2.xml and the logPath property is defined as </p>
  
  <pre><code>&lt;Property name="logPath"&gt;some_path_2&lt;Property&gt;
  </code></pre>
  
  <p>and a logger with a very similar packaging structure </p>
  
  <pre><code>&lt;Logger name="a.b.c" level="INFO" /&gt;
  </code></pre>
  
  <p>Both log4j2.xml's are configured to have a different log file name as well.
  But the logs for both are coming in the path some_path_2 and with the file name defined in that jar</p>
  
  <p>How to ensure both logging outputs happens separately as defined?</p>
  
  <p>My ear structure is like</p>
  
  <pre><code>ear
  |--lib
  |--|--abc.jar
  |--|--|--log4j2.xml //the one thats getting loaded
  |--xyz.war
  |--|--WEB-INF
  |--|--|--classes
  |--|--|--|--log4j2.xml // the one I want
  </code></pre>
  
  <p>Edit1: I added the following in the containing war's web.xml but it did not help</p>
  
  <pre><code>    &lt;context-param&gt;
          &lt;param-name&gt;log4jConfigLocation&lt;/param-name&gt;
          &lt;param-value&gt;/WEB-INF/classes/log4j2.xml&lt;/param-value&gt;
      &lt;/context-param&gt;
  </code></pre>
  
  <p>Edit2: I also tried this and found that this is working intermittently</p>
  
  <pre><code>ear
  |--lib
  |--|--abc.jar
  |--|--|--log4j2.xml //the one thats getting loaded
  |--|--xyz.jar
  |--|--|--log4j2.xml //the one I want.. works but not always.Does classloader loads the jars alphabetically?
  |--xyz.war
  |--|--WEB-INF
  |--|--|--classes
  |--|--|--|--log4j2.xml // the one I want
  </code></pre>