[slf4j-user] Selected binding

Ceki Gulcu ceki at qos.ch
Thu Jun 15 14:04:38 CEST 2017


Hi Justin,

When there is a single binding, that binding will be selected silently.

In case there a multiple bindings, then the "Multiple bindings were 
found on the class path" warning will be issued with a link to

   https://www.slf4j.org/codes.html#multiple_bindings

Quoting from the above link:

     SLF4J API is designed to bind with one and only one
     underlying logging framework at a time. If more than one
     binding is present on the class path, SLF4J will emit a
     warning, listing the location of those bindings.

     NOTE The warning emitted by SLF4J is just that, a
     warning. Even when multiple bindings are present, SLF4J will
     pick one logging framework/implementation and bind with
     it. The way SLF4J picks a binding is determined by the JVM
     and for all practical purposes should be considered
     random. As of version 1.6.6, SLF4J will name the
     framework/implementation class it is actually bound to.

The last sentence in the above quote might be the answer you are looking 
for.

--
Ceki Gülcü

On 02.05.2017 10:26, Justin Mares wrote:
> Hello,
>
> There is a way to find which binding is chosen at startup? More general,
> there is a way to see some (debugging) information during initialization
> process?
>
> Thanks,
> Justin
>


More information about the slf4j-user mailing list