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

Log opening connection message as debug instead of info

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor - P4
    • Resolution: Fixed
    • None
    • 4.8.0
    • Logging
    • None
    • Minor Change
    • Not Needed

    Description

      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)

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: