Log channel ID when getting their difference

This commit is contained in:
Lonami Exo 2022-09-27 11:31:26 +02:00
parent fd70b5a428
commit 105a7a7c56

View File

@ -294,7 +294,7 @@ class UpdateMethods:
get_diff = self._message_box.get_channel_difference(self._mb_entity_cache) get_diff = self._message_box.get_channel_difference(self._mb_entity_cache)
if get_diff: if get_diff:
self._log[__name__].info('Getting difference for channel updates') self._log[__name__].info('Getting difference for channel %s updates', get_diff.channel.channel_id)
try: try:
diff = await self(get_diff) diff = await self(get_diff)
except ( except (
@ -322,9 +322,9 @@ class UpdateMethods:
# We treat this as PersistentTimestampOutdatedError for now. # We treat this as PersistentTimestampOutdatedError for now.
# TODO investigate why/when this happens and if this is the proper solution # TODO investigate why/when this happens and if this is the proper solution
self._log[__name__].warning( self._log[__name__].warning(
'Getting difference for channel updates caused %s;' 'Getting difference for channel updates %s caused %s;'
' ending getting difference prematurely until server issues are resolved', ' ending getting difference prematurely until server issues are resolved',
type(e).__name__ get_diff.channel.channel_id, type(e).__name__
) )
self._message_box.end_channel_difference( self._message_box.end_channel_difference(
get_diff, get_diff,