Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-2203

Remove org.slf4j.impl.StaticLoggerBinder check

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.7.0
    • 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.

        1. Loggers.patch
          0.5 kB
          Hesham Ahmed

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            hsahmed@gmail.com Hesham Ahmed
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: