Page tree
Skip to end of metadata
Go to start of metadata

JBoss 7 Application Server adds its own log4j logging configuration. If you want to use your own log4j logging configuration in your deployment, exclude the JBoss configuration first.

Create a new file jboss-deployment-structure.xml under the WEB-INF folder with this content:

<jboss-deployment-structure>
  <deployment>
  <!-- Exclusions allow you to prevent the server from automatically adding some dependencies -->
    <exclusions>
      <module name="org.apache.log4j" />
      <module name="org.slf4j" />
    </exclusions>
  </deployment>
</jboss-deployment-structure>

See How do I use log4j.properties or log4j.xml instead of using the logging subsystem configuration?