JBoss AS 7: Logging

こ雲淡風輕ζ 提交于 2019-12-04 08:47:20

While it's not in the question, I do assume you are attempting to use log4j with JBoss AS7. If that is true and you do need to use appenders, then you need to exclude the log4j that comes with the server and package your own version with your deployment currently. This should be changing soon once AS7-514 is resolved. Once that feature is added, nothing will need to be done on your side.

To resolve the issue for now you first need to create a jboss-deployment-structure.xml that should look like the following:

<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 add your own version of log4j to your WEB-INF/lib directory or any other place where the deployment would be able to find the library.

After that it should work just as you would expect.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!