summary refs log tree commit diff
path: root/synapse/events
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2021-08-16 13:19:02 +0100
committerGitHub <noreply@github.com>2021-08-16 13:19:02 +0100
commit2d9ca4ca77c2cdf98ddb738aee8d5699c7c8749f (patch)
tree3b5a2347f0b178d3cea7c49c7cdf292cb2542c0a /synapse/events
parentSupport federation in the new spaces summary API (MSC2946). (#10569) (diff)
downloadsynapse-2d9ca4ca77c2cdf98ddb738aee8d5699c7c8749f.tar.xz
Clean up some logging in the federation event handler (#10591)
* Include outlier status in `str(event)`

In places where we log event objects, knowing whether or not you're dealing
with an outlier is super useful.

* Remove duplicated logging in get_missing_events

When we process events received from get_missing_events, we log them twice
(once in `_get_missing_events_for_pdu`, and once in `on_receive_pdu`). Reduce
the duplication by removing the logging in `on_receive_pdu`, and ensuring the
call sites do sensible logging.

* log in `on_receive_pdu` when we already have the event

* Log which prev_events we are missing

* changelog
Diffstat (limited to 'synapse/events')
-rw-r--r--synapse/events/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/events/__init__.py b/synapse/events/__init__.py
index 0298af4c02..a730c1719a 100644
--- a/synapse/events/__init__.py
+++ b/synapse/events/__init__.py
@@ -396,10 +396,11 @@ class FrozenEvent(EventBase):
         return self.__repr__()
 
     def __repr__(self):
-        return "<FrozenEvent event_id=%r, type=%r, state_key=%r>" % (
+        return "<FrozenEvent event_id=%r, type=%r, state_key=%r, outlier=%s>" % (
             self.get("event_id", None),
             self.get("type", None),
             self.get("state_key", None),
+            self.internal_metadata.is_outlier(),
         )