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}
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.
- is caused by
-
PYTHON-3459 Add log messages to Server selection spec
- Closed
- is related to
-
PYTHON-4470 PyMongo always logs in JSON/structured format, and does not respect app choices
- Closed
-
DRIVERS-2858 Log line for "Waiting for suitable server to become available" is too noisy
- Backlog