Log4j2 not working in WebLogic 12.2.1
<p>I am trying to add log4j logging in my web services running under WebLogic 12.2.1 but somehow the logging is not working.</p>

<p>This is log4j2.xml in WEB-INF\classes of my WAR file:</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;Configuration status="DEBUG"&gt;
    &lt;Properties&gt;
        &lt;Property name="log-path"&gt;E:/MLM/MyDomain/servers/MyAppSrv01/logs&lt;/Property&gt;
    &lt;/Properties&gt;
    &lt;Appender type="File" name="File" fileName="${log-path}/Services.log" filePattern="${log-path}/Services-%d{yyyy-MM-dd}.log"&gt;
        &lt;Layout type="PatternLayout"&gt;
            &lt;PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/&gt;
        &lt;/Layout&gt;
    &lt;/Appender&gt;
    &lt;Loggers&gt;
        &lt;Root level="INFO"&gt;
            &lt;AppenderRef ref="File"/&gt;
        &lt;/Root&gt;
    &lt;/Loggers&gt;
&lt;/Configuration&gt;
</code></pre>

<p>Here is a fragment of my web service codes:</p>

<pre><code>@Path("TestWS")
@Consumes("text/plain")
@Produces("text/plain")
public class TestWS {

    static private Logger logger = LogManager.getLogger();

    public TestWS() {}

    @GET
    @Produces(MediaType.TEXT_PLAIN)
    @Path("webservicemethod1")
    public String webservicemethod1(@Context HttpServletRequest request) {
        logger.error("In webservicemethod1");
        ....
    }

}
</code></pre>

<p>In WEB-INF\lib\ of my WAR file, I have:</p>

<pre><code>log4j-core-2.5.jar
log4j-api-2.5.jar
</code></pre>

<p>I can call the web service successfully using a client program. But I don't see the log file getting created at all. What could be the problem?</p>

<p>Thanks in advance.</p>