using log4j with JBOSS AS 7.1.1

put this jboss-deployment-structure.xml to your ear’s META-INF

<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
 <deployment>
 <exclusions>
 <module name="org.apache.log4j" />
 </exclusions>
 </deployment>
 <sub-deployment name="your_war_folder.war">
 <exclusions>
 <module name="org.apache.log4j" />
 </exclusions>
 </sub-deployment> 
</jboss-deployment-structure>

for war deployment, put it in your WEB-INF

<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
<deployment>
<exclusions>
<module name="org.apache.log4j" />
</exclusions>
</deployment> 
</jboss-deployment-structure>

 

Advertisements