From 66d72b7e1794122126f297cda55ede3b16f19991 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 8 Sep 2021 13:59:15 +0100 Subject: [PATCH] Change logging of puppeted requests to better differentiate users (#10779) This used to be a comma and got accidentally changed to a period in #9654, but a pipe character is more easier to parse visually. --- changelog.d/10779.misc | 1 + synapse/http/site.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/10779.misc diff --git a/changelog.d/10779.misc b/changelog.d/10779.misc new file mode 100644 index 0000000000..9275a83039 --- /dev/null +++ b/changelog.d/10779.misc @@ -0,0 +1 @@ +Change the format of authenticated users in logs when a user is being puppeted by and admin user. diff --git a/synapse/http/site.py b/synapse/http/site.py index 190084e8aa..c665a9d5db 100644 --- a/synapse/http/site.py +++ b/synapse/http/site.py @@ -384,7 +384,7 @@ class SynapseRequest(Request): # authenticated (e.g. and admin is puppetting a user) then we log both. requester, authenticated_entity = self.get_authenticated_entity() if authenticated_entity: - requester = f"{authenticated_entity}.{requester}" + requester = f"{authenticated_entity}|{requester}" self.site.access_logger.log( log_level,