I am using slf4j for logging in my application. I get the purpose of slf4j. I would like to know how to find out which logging-library slf4j is currently binding to. I have
It's possible to do this using the main slf4j public API (i.e. without the internal StaticLoggerBinder), e.g. to detect if slf4j has bpound to log4j2:
if ("org.apache.logging.slf4j.Log4jLoggerFactory".equals( org.slf4j.LoggerFactory.getILoggerFactory().getClass().getName() ) { ... }