In this final recipe about logging, we will learn how to use a different logging implementation. In the earlier version of JBoss AS, you could have relied on the java.util.logging
(also JUL) or the log4j
implementation. WildFly relies on the JUL logging implementation.
To manage which logging implementation you can use, WildFly gives you a couple of attributes.
The first one is named add-logging-api-dependencies
, which can be set to true
(default value) or to false
. When it's true, the WildFly logging default implementation is automatically added to all deployments.
The other attribute is named use-deployment-logging-config
, which can be set to true
(default value) or to false
. When set to true
, it gives to deployments the per-deployment logging
feature, which essentially enables your application to carry its own logging configuration file.
The following configuration files are allowed:
logging.properties
jboss-logging.properties
log4j...