PYTHON-5371 - Pass repr(ServerDescription) to logging (#2329)

This commit is contained in:
Noah Stapp 2025-05-08 14:20:11 -04:00 committed by GitHub
parent 5914ea0ff4
commit 775b683276
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 16 additions and 16 deletions

View File

@ -154,8 +154,8 @@ class Topology:
_SDAM_LOGGER,
message=_SDAMStatusMessage.TOPOLOGY_CHANGE,
topologyId=self._topology_id,
previousDescription=initial_td,
newDescription=self._description,
previousDescription=repr(initial_td),
newDescription=repr(self._description),
)
for seed in topology_settings.seeds:
@ -514,8 +514,8 @@ class Topology:
_SDAM_LOGGER,
message=_SDAMStatusMessage.TOPOLOGY_CHANGE,
topologyId=self._topology_id,
previousDescription=td_old,
newDescription=self._description,
previousDescription=repr(td_old),
newDescription=repr(self._description),
)
# Shutdown SRV polling for unsupported cluster types.
@ -581,8 +581,8 @@ class Topology:
_SDAM_LOGGER,
message=_SDAMStatusMessage.TOPOLOGY_CHANGE,
topologyId=self._topology_id,
previousDescription=td_old,
newDescription=self._description,
previousDescription=repr(td_old),
newDescription=repr(self._description),
)
async def on_srv_update(self, seedlist: list[tuple[str, Any]]) -> None:
@ -747,8 +747,8 @@ class Topology:
_SDAM_LOGGER,
message=_SDAMStatusMessage.TOPOLOGY_CHANGE,
topologyId=self._topology_id,
previousDescription=old_td,
newDescription=self._description,
previousDescription=repr(old_td),
newDescription=repr(self._description),
)
_debug_log(
_SDAM_LOGGER, message=_SDAMStatusMessage.STOP_TOPOLOGY, topologyId=self._topology_id

View File

@ -154,8 +154,8 @@ class Topology:
_SDAM_LOGGER,
message=_SDAMStatusMessage.TOPOLOGY_CHANGE,
topologyId=self._topology_id,
previousDescription=initial_td,
newDescription=self._description,
previousDescription=repr(initial_td),
newDescription=repr(self._description),
)
for seed in topology_settings.seeds:
@ -514,8 +514,8 @@ class Topology:
_SDAM_LOGGER,
message=_SDAMStatusMessage.TOPOLOGY_CHANGE,
topologyId=self._topology_id,
previousDescription=td_old,
newDescription=self._description,
previousDescription=repr(td_old),
newDescription=repr(self._description),
)
# Shutdown SRV polling for unsupported cluster types.
@ -581,8 +581,8 @@ class Topology:
_SDAM_LOGGER,
message=_SDAMStatusMessage.TOPOLOGY_CHANGE,
topologyId=self._topology_id,
previousDescription=td_old,
newDescription=self._description,
previousDescription=repr(td_old),
newDescription=repr(self._description),
)
def on_srv_update(self, seedlist: list[tuple[str, Any]]) -> None:
@ -745,8 +745,8 @@ class Topology:
_SDAM_LOGGER,
message=_SDAMStatusMessage.TOPOLOGY_CHANGE,
topologyId=self._topology_id,
previousDescription=old_td,
newDescription=self._description,
previousDescription=repr(old_td),
newDescription=repr(self._description),
)
_debug_log(
_SDAM_LOGGER, message=_SDAMStatusMessage.STOP_TOPOLOGY, topologyId=self._topology_id