qos-ch / slf4j

Simple Logging Facade for Java
http://www.slf4j.org
MIT License
2.34k stars 990 forks source link

✨ Adds feature that allows to prefer a provider #350

Open mcarlett opened 1 year ago

mcarlett commented 1 year ago

In case of multiple provides found in class path, instead of picking first, it is possible to prefer one using system property slf4j.preferred.provider, providing the claas name

example: -Dslf4j.preferred.provider=ch.qos.logback.classic.spi.LogbackServiceProvider will pick the instance of this type if present in the list of the identified providers, instead of first one in the list