log4j in EAP 6.4
I am deploying seam 2.2 application in EAP 6.4. In EAP 6, logging dependencies for common third-party frameworks like Apache log4j and SLF4J are added by default. Is it possible to use default log4j library? If yes, how to config log4j properties?
It is described in the document that I need exclude third party logging framework dependencies and then add log4j library into application level for using a log4j.properties or log4j.xml file. Can I just copy log4j jar file from EAP 6 default module? Or I have to download apache log4j library.
Responses
In my opinion it is definitely not better as a customer to use the log4j (or slf4j) embedded in JBoss EAP. For better or worse, logging is not part of the JEE specification and using a vendor-specific container-provided logging provider is not standard practice. It might be better for RedHat to have you more locked in to their solution.
A more forward looking and standard solution for EAP 6.3 and above than the one referenced in https://access.redhat.com/solutions/105653, is to set a system property "add-logging-api-dependencies" to false as described in this KB article:
https://access.redhat.com/solutions/1202633 "Disable implicit logging dependencies in EAP 6 "
Then JBoss EAP acts like other containers with respect to log4j, slf4j, etc.
Regards,
Scott
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
