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

Remove support for logging to JUL (java.util.logging)

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.0.0
    • Affects Version/s: 3.8.1
    • Component/s: Monitoring
    • None
    • Environment:
      OSGI DS, ch.qos.logback.classic fragment implementation, Eclipse IDE, Java 1.8.0_181, Java Driver 3.8
    • Minor Change

      Remove direct support for JUL in the 4.x driver, making SLF4J the only way for the driver to log.  Applications requiring JUL logging must use the SFL4J-JUL bridge library.

      If SLF4J is not detected, the driver will log a single message to JUL indicating that logging is disabled.

      Original Description

      I am working on an OSGI DS project that implements an OSGI fragment with ch.qos.logback.classic to attach to slf4j. Because I am using slf4j, the driver uses it for its default logging unless I override it by setting the logger level to OFF in the code base. However, even with this, the driver continues to use com.mongodb.diagnostics.logging.JULLogger, java.util.logging.Logger, as a fallback. The driver should not force an application to output its logging but rather some configuration or programmatic setting should be added to prevent any logging to the console.

      I would think at least a public interface to the JULLoger or diagnostics.

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            DallasP9124 Dallas Phillips [X]
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: