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

Log opening connection message as debug instead of info

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 4.8.0
    • Affects Version/s: None
    • Component/s: Logging
    • Labels:
      None
    • Minor Change
    • Not Needed

      Change the "Opened connection ..." log message from INFO to DEBUG.

      Justification: it's the only remaining connection-related log message that is logged at INFO (e.g. the connection-closed message is logged at DEBUG).

      Original Description

      I looked around the driver source-code and found "maintenanceTimer" Executor Daemon for sdam(server-discovery-and-monitoring) in DefaultConnectionPool.java

      It is also doing maintenance scheduled(fixedRate) and i checked that logic is connection pool prune(clear) -> new connection open.

      so every maintenance frequency(default: 1min), Logger is writing logs with info level.

      so many unnecessary things are being written in our log files.

      Is this log level intended to be info? Or is it a bug?

      Additionally, we would like to modify the log level of the logger(org.mongodb.driver.connection) to warn so that the log is not included in our log files.

      Is this the best way? (we would like to use the level of the loggers as info)

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            sun@jupiterflow.com Taeyang Jin (Heli)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: