I am deploying an EAR application on Weblogic 12c. I am looking to configure log4j2 and putting the following in web.xml (of the web project) is not working (file is not picked up by the application).
<context-param>
<param-name>log4jConfiguration</param-name>
<param-value>file:///webapps/apps/appName/log4j2.xml</param-value>
</context-param>
I get the error
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
If i mention the path to the log4j2.xml file in the weblogic startup script (-Dlog4j.configurationFile=path/to/log4j2.xml
), it picks up the log4j file. How can I get the <context-param>
setting to work? I am running weblogic from within Eclipse (STS).