Skip to content

Commit

Permalink
PYTHON-4261 [v4.7] Reduce verbosity of "Waiting for suitable server t…
Browse files Browse the repository at this point in the history
…o become available" log message (#1657)
  • Loading branch information
ShaneHarvey authored Jun 4, 2024
1 parent c7db2c2 commit 839904f
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Version 4.7.3 has further fixes for lazily loading modules.

- Use deferred imports instead of importlib lazy module loading.
- Improve import time on Windows.
- Reduce verbosity of "Waiting for suitable server to become available" log message from info to debug.

Issues Resolved
...............
Expand Down
3 changes: 1 addition & 2 deletions pymongo/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
from pymongo.logger import (
_SERVER_SELECTION_LOGGER,
_debug_log,
_info_log,
_ServerSelectionStatusMessage,
)
from pymongo.monitor import SrvMonitor
Expand Down Expand Up @@ -306,7 +305,7 @@ def _select_servers_loop(
)

if not logged_waiting:
_info_log(
_debug_log(
_SERVER_SELECTION_LOGGER,
message=_ServerSelectionStatusMessage.WAITING,
selector=selector,
Expand Down
2 changes: 1 addition & 1 deletion test/server_selection_logging/operation-id.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
}
},
{
"level": "info",
"level": "debug",
"component": "serverSelection",
"data": {
"message": "Waiting for suitable server to become available",
Expand Down
2 changes: 1 addition & 1 deletion test/server_selection_logging/replica-set.json
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
}
},
{
"level": "info",
"level": "debug",
"component": "serverSelection",
"data": {
"message": "Waiting for suitable server to become available",
Expand Down
2 changes: 1 addition & 1 deletion test/server_selection_logging/sharded.json
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
}
},
{
"level": "info",
"level": "debug",
"component": "serverSelection",
"data": {
"message": "Waiting for suitable server to become available",
Expand Down
2 changes: 1 addition & 1 deletion test/server_selection_logging/standalone.json
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@
}
},
{
"level": "info",
"level": "debug",
"component": "serverSelection",
"data": {
"message": "Waiting for suitable server to become available",
Expand Down

0 comments on commit 839904f

Please sign in to comment.