Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

PYTHON-4261 [v4.7] Reduce verbosity of "Waiting for suitable server to become available" log message #1657

Merged
merged 1 commit into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading