Unable to exclude JBoss 7 logging modules
teg79 Nov 20, 2012 3:31 AMHi guys,
I'm porting a EAR application to JBoss 7, in our requirements we have to use the Logback DB Appender, our customer has developed tools to read that DB logs and we must support this logging system.
In this forum we found some documentation about jboss-depoyment-structure.xml, but after many modifications we are still unable to exclude the JBoss logging system for our application.
Here the jboss-deployment-structure.xml:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
<deployment>
<exclusions>
<module name="org.slf4j" />
<module name="org.slf4j.impl" />
<module name="ch.qos.logback" />
<module name="org.apache.commons.logging"/>
<module name="org.apache.log4j"/>
<module name="org.jboss.logging"/>
<module name="org.jboss.logging.jul-to-slf4j-stub"/>
<module name="org.jboss.logmanager"/>
<module name="org.jboss.logmanager.log4j"/>
</exclusions>
</deployment>
<sub-deployment name="my-ejb.jar">
<exclusions>
<module name="org.slf4j" />
<module name="org.slf4j.impl" />
<module name="ch.qos.logback" />
<module name="org.apache.commons.logging"/>
<module name="org.apache.log4j"/>
<module name="org.jboss.logging"/>
<module name="org.jboss.logging.jul-to-slf4j-stub"/>
<module name="org.jboss.logmanager"/>
<module name="org.jboss.logmanager.log4j"/>
</exclusions>
</sub-deployment>
<sub-deployment name="my-web-2.0.0-SNAPSHOT.war">
<exclusions>
<module name="org.slf4j" />
<module name="org.slf4j.impl" />
<module name="ch.qos.logback" />
<module name="org.apache.commons.logging"/>
<module name="org.apache.log4j"/>
<module name="org.jboss.logging"/>
<module name="org.jboss.logging.jul-to-slf4j-stub"/>
<module name="org.jboss.logmanager"/>
<module name="org.jboss.logmanager.log4j"/>
</exclusions>
</sub-deployment>
<sub-deployment name="another-web-1.0.0-SNAPSHOT.war">
<exclusions>
<module name="org.slf4j" />
<module name="org.slf4j.impl" />
<module name="ch.qos.logback" />
<module name="org.apache.commons.logging"/>
<module name="org.apache.log4j"/>
<module name="org.jboss.logging"/>
<module name="org.jboss.logging.jul-to-slf4j-stub"/>
<module name="org.jboss.logmanager"/>
<module name="org.jboss.logmanager.log4j"/>
</exclusions>
</sub-deployment>
</jboss-deployment-structure>
We put also a similar file (without sub-deployments) in each application module in META-INF for the ejb-jar and in WEB-INF for the 2 web apps.
The result is always the same, JBoss still use its internal logging.
Thanks in advance for the help
Francesco