-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
HTTPStatus.*
have started to appear in Processed request
log lines instead of an integer
#11812
Comments
Sorry, this has my fingerprints all over it. |
|
I do like using HTTPStatus, but perhaps we should |
If we're starting to lean towards using |
synapse/synapse/http/server.py Lines 202 to 207 in cbd82d0
We could extend this to include @babolivier I agree that that would probably be less things to update (and to remember) than doing |
FWIW note that >>> import http
>>> isinstance(http.HTTPStatus.OK, int)
True |
we've had this before, btw: #7017 |
Fixes #11812. See also #7118 and #7188 (comment) in particular.
* Don't print HTTPStatus.* in "Processed..." logs Fixes #11812. See also #7118 and #7188 (comment) in particular. Co-authored-by: Brendan Abolivier <babolivier@matrix.org>
An example log line from matrix.org:
This seems to currently happening for
EventReportsRestServlet
,RoomStateRestServlet
andRoomRestServlet
. 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 expect200
. This seems to happen as we simply cast the return code to astr
:synapse/synapse/http/site.py
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.
The text was updated successfully, but these errors were encountered: