Use my own log4j.xml with EAP 6.1

Latest response

Seems that this question is everywhere, but I've yet to come up with a solution. I have a WEB-INF\classes\log4j.xml with the root level of the logger set to DEBUG.

I'm deploying the following in my WEB-INF\lib directory
log4j-1.2.17.jar
slf4j-api-1.7.5.jar
slf4j-log4j12-1.7.5.jar

I have a jboss-deployment-structure.xml file at the root of WEB-INF\ that looks like this.


<?xml version="1.0" encoding="UTF-8"?> <jboss-deployment-structure> <deployment> <!-- Exclusions allow you to prevent the server from automatically adding some dependencies --> <exclusions> <module name="org.apache.log4j" /> </exclusions> </deployment> </jboss-deployment-structure>

Then in my run.conf there was already a line for
JAVA_OPTS="$JAVA_OPTS -Dorg.jboss.as.logging.per-deployment=false"

and I've confirmed this is getting used from the console.log.

When JBOSS starts up all I get is INFO messages and it doesn't appear to be using my log4j.xml configuration whatsoever.

What are the steps needed to use my log4j.xml and my deployed jars for logging?

Responses