-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 3.0.0
-
Component/s: Monitoring
-
None
-
Minor Change
com.mongodb.diagnostics.logging.Loggers class checks for the presence of both the slf4j-api and slf4j implementation before enabling slf4j logging. The second check should not be performed since org.slf4j.impl.StaticLoggerBinder might not be accessible in every case (OSGi bundles which want to hide slf4j implementation). And in any case, having SLF4J API without an implementation should be an SLF4J issue which it handles well (displaying warnings etc.). MongoDB Java driver should only check for the presence of SLF4J API, and use it if present. Patch to remove the second test is attached.