Remove log_function and its uses (#11761)

I've never found this terribly useful. I think it was added in the early days
of Synapse, without much thought as to what would actually be useful to log,
and has just been cargo-culted ever since.

Rather, it tends to clutter up debug logs with useless information.
This commit is contained in:
Richard van der Hoff 2022-01-18 13:06:04 +00:00 committed by GitHub
parent 47961ea855
commit 251b5567ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 1 additions and 155 deletions

View file

@ -51,7 +51,6 @@ from synapse.logging.context import (
preserve_fn,
run_in_background,
)
from synapse.logging.utils import log_function
from synapse.replication.http.federation import (
ReplicationCleanRoomRestServlet,
ReplicationStoreRoomOnOutlierMembershipRestServlet,
@ -556,7 +555,6 @@ class FederationHandler:
run_in_background(self._handle_queued_pdus, room_queue)
@log_function
async def do_knock(
self,
target_hosts: List[str],
@ -928,7 +926,6 @@ class FederationHandler:
return event
@log_function
async def on_make_knock_request(
self, origin: str, room_id: str, user_id: str
) -> EventBase:
@ -1039,7 +1036,6 @@ class FederationHandler:
else:
return []
@log_function
async def on_backfill_request(
self, origin: str, room_id: str, pdu_list: List[str], limit: int
) -> List[EventBase]:
@ -1056,7 +1052,6 @@ class FederationHandler:
return events
@log_function
async def get_persisted_pdu(
self, origin: str, event_id: str
) -> Optional[EventBase]:
@ -1118,7 +1113,6 @@ class FederationHandler:
return missing_events
@log_function
async def exchange_third_party_invite(
self, sender_user_id: str, target_user_id: str, room_id: str, signed: JsonDict
) -> None: