Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Merge commit '2f9fd5ab0' into anoa/dinsic_release_1_21_x
Browse files Browse the repository at this point in the history
* commit '2f9fd5ab0':
  Don't log OPTIONS request at INFO (#8049)
  • Loading branch information
anoadragon453 committed Oct 19, 2020
2 parents a67a65a + 2f9fd5a commit 5ede106
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/8049.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Log `OPTIONS` requests at `DEBUG` rather than `INFO` level to reduce amount logged at `INFO`.
8 changes: 7 additions & 1 deletion synapse/http/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,13 @@ def _finished_processing(self):
def _should_log_request(self) -> bool:
"""Whether we should log at INFO that we processed the request.
"""
return self.path != b"/health"
if self.path == b"/health":
return False

if self.method == b"OPTIONS":
return False

return True


class XForwardedForRequest(SynapseRequest):
Expand Down

0 comments on commit 5ede106

Please sign in to comment.