-
1. Re: WildFly 10 slf4j binding
jamezp Feb 24, 2017 3:17 PM (in response to daled)You shouldn't need to specify the binding at all. It should automatically be added to your deployment. Are you not seeing logged messages?
--
James R. Perkins
-
2. Re: WildFly 10 slf4j binding
daled Feb 27, 2017 12:30 PM (in response to jamezp)I'm not in troubleshoot mode. I'm in understand mode.
I'm trying to confirm two assumptions:
1. The scope for slf4j-api should be "provided". Simply referencing an slf4j logger within the java code will cause WildFly logging to use the slf4j api.
2. The default slf4j binding for WildFly is slf4j-jboss-logmanager. If there is a desire to use a different binding, the binding must be set to "compile" scope. Would this override the default slf4j-jboss-logmanager binding?
Thanks.
-
3. Re: WildFly 10 slf4j binding
jamezp Feb 27, 2017 11:17 AM (in response to daled)1. The scope for slf4j-api should be "provided". Simply referencing an slf4j logger within the java code will cause WildFly logging will use the slf4j api.
Correct. WildFly will automatically add the org.slf4j module dependency to your deployment.
2. The default slf4j binding for WildFly is slf4j-jboss-logmanager. If there is a desire to use a different binding, the binding must be set to "compile" scope. Would this override the default slf4j-jboss-logmanager binding?
Yes the default binding is the slf4j-jboss-logmanager. However if you want to use a different binding you need to exclude the org.slf4j module from being added to your deployment, include the slf4j-api in your deployment along with the desired binding. There are several ways to exclude the org.slf4j module, but the easiest is just to use a jboss-deployment-structure.xml and exclude the logging subsystem.
--
James R. Perkins
-
4. Re: WildFly 10 slf4j binding
daled Feb 27, 2017 12:29 PM (in response to jamezp)Awesome. Thanks.