Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: DOCU-439 Jboss AS 7 log4j configuration

...

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

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

Code Block
languagehtml/xml
<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?

...