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.
This commit is contained in:
Richard van der Hoff 2022-03-25 14:44:57 +00:00 committed by GitHub
parent 14662d3c18
commit 38adf14998
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

1
changelog.d/12301.misc Normal file
View File

@ -0,0 +1 @@
Enhance logging for inbound federation events.

View File

@ -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(