Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-4261

Log line for "Waiting for suitable server to become available" is too noisy

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 4.8, 4.7.3
    • Affects Version/s: None
    • Component/s: None
    • None
    • Python Drivers
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      The log line for "Waiting for suitable server to become available" is too noisy to be at level INFO, for example in the test suite:

       [2024/03/05 08:26:06.602] ------------------------------ Captured log call -------------------------------
       [2024/03/05 08:26:06.602] INFO     pymongo.serverSelection:logger.py:94 {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": "<TopologyDescription id: 65e74798e1229616f1003db2, topology_type: ReplicaSetNoPrimary, servers: [<ServerDescription ('localhost', 27017) server_type: Unknown, rtt: None>]>", "clientId": {"$oid": "65e74798e1229616f1003db2"}, "remainingTimeMS": 29}
      

      https://spruce.mongodb.com/task/mongo_python_driver_tests_python_version_rhel8_test_ssl__platform~rhel8_auth_ssl~auth_ssl_python_version~3.8_coverage~coverage_test_7.0_replica_set_b041ca5f7c201f1b0ecb97c517a1ece8d775c00a_24_03_05_15_53_53/logs?execution=0&sortBy=STATUS&sortDir=ASC

      I think we should log this at DEBUG level instead, otherwise users are going to be confused. Essentially this line will be logged every time a client is first created and used.

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: