mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
Use %r
rather than %s
for stringifying events (#8679)
otherwise non-state events get written as `<FrozenEvent ... state_key='None'>` which is indistinguishable from state events with the actual state_key `None`.
This commit is contained in:
parent
56f0ee78a9
commit
0073fe914a
1
changelog.d/8679.misc
Normal file
1
changelog.d/8679.misc
Normal file
@ -0,0 +1 @@
|
||||
Clarify representation of events in logfiles.
|
@ -368,7 +368,7 @@ class FrozenEvent(EventBase):
|
||||
return self.__repr__()
|
||||
|
||||
def __repr__(self):
|
||||
return "<FrozenEvent event_id='%s', type='%s', state_key='%s'>" % (
|
||||
return "<FrozenEvent event_id=%r, type=%r, state_key=%r>" % (
|
||||
self.get("event_id", None),
|
||||
self.get("type", None),
|
||||
self.get("state_key", None),
|
||||
@ -451,7 +451,7 @@ class FrozenEventV2(EventBase):
|
||||
return self.__repr__()
|
||||
|
||||
def __repr__(self):
|
||||
return "<%s event_id='%s', type='%s', state_key='%s'>" % (
|
||||
return "<%s event_id=%r, type=%r, state_key=%r>" % (
|
||||
self.__class__.__name__,
|
||||
self.event_id,
|
||||
self.get("type", None),
|
||||
|
Loading…
Reference in New Issue
Block a user