This content has been marked as final.
Show 1 reply
-
1. Re: Logging issue in JBoss 7.0.2 Final standalone-preview
beve Oct 13, 2011 8:53 AM (in response to gboro54)Hi,
you'll need to declare a dependency to 'org.apache.log4j'. You can do this by adding a manifest header like this:
Dependencies: org.apache.log4j
Adding this dependency should enable your application to deploy but to be able to customize logging you'll need to package log4j with your deployment or as a separate deployment/module. The reason for this is that log4j needs to be initialized with your custom log4j.xml, and if you only specify a dependency to the module 'org.apache.log4j', log4j will have been initialized before your module is deployed and your custom logging configuration will not be considered. For an example of this you can take a look at this application, see the section "Custom logging" for details.
Regards,
/Daniel