This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
HTTPStatus.*
have started to appear in Processed request
log lines instead of an integer #11812
Closed
Description
An example log line from matrix.org:
2022-01-24 08:10:36,396 - synapse.access.http.8080 - 445 - INFO - GET-7050353 - xxx.xxx.xxx.xxx - 8080 - {@redacted:matrix.org} Processed request: 0.296sec/0.003sec (0.007sec, 0.000sec) (0.002sec/0.288sec/2) 36141B HTTPStatus.OK "GET /_synapse/admin/v1/event_reports HTTP/1.1" "aiohttp/0.2.1" [0 dbevts]
This seems to currently happening for EventReportsRestServlet
, RoomStateRestServlet
and RoomRestServlet
. Perhaps other endpoints are affected, but none observed in the recent logs on matrix.org.
Notice the HTTPStatus.OK
in the logs, whereas one would expect 200
. This seems to happen as we simply cast the return code to a str
:
Line 410 in 10a88ba
However, str(HTTPStatus.OK)
unhelpfully resolves to the str "HTTPStatus.OK"
...
This could have implications for scripts that parse Synapse logs.