summary refs log tree commit diff
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2022-03-25 14:44:57 +0000
committerGitHub <noreply@github.com>2022-03-25 14:44:57 +0000
commit38adf14998d2f727d689cfcfc7363aac52aaff9f (patch)
tree7c305c3e00cf8b320bfb2430a8844ce87c97f0bb
parentRefactor `create_new_client_event` to use a new parameter, `state_event_ids`,... (diff)
downloadsynapse-38adf14998d2f727d689cfcfc7363aac52aaff9f.tar.xz
Enhance logging for inbound federation events (#12301)
It is currently rather hard to see which rooms are causing inbound federation
traffic. Add the room id to the logs.
-rw-r--r--changelog.d/12301.misc1
-rw-r--r--synapse/federation/federation_server.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/changelog.d/12301.misc b/changelog.d/12301.misc
new file mode 100644
index 0000000000..a4cd94ee5e
--- /dev/null
+++ b/changelog.d/12301.misc
@@ -0,0 +1 @@
+Enhance logging for inbound federation events.
diff --git a/synapse/federation/federation_server.py b/synapse/federation/federation_server.py
index af2d0f7d79..c7400c737b 100644
--- a/synapse/federation/federation_server.py
+++ b/synapse/federation/federation_server.py
@@ -1092,7 +1092,7 @@ class FederationServer(FederationBase):
         # has started processing).
         while True:
             async with lock:
-                logger.info("handling received PDU: %s", event)
+                logger.info("handling received PDU in room %s: %s", room_id, event)
                 try:
                     with nested_logging_context(event.event_id):
                         await self._federation_event_handler.on_receive_pdu(