Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Timo Ley
synapse
Commits
2f9fd5ab
Unverified
Commit
2f9fd5ab
authored
4 years ago
by
Erik Johnston
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Don't log OPTIONS request at INFO (#8049)
parent
4e874ed5
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changelog.d/8049.misc
+1
-0
1 addition, 0 deletions
changelog.d/8049.misc
synapse/http/site.py
+7
-1
7 additions, 1 deletion
synapse/http/site.py
with
8 additions
and
1 deletion
changelog.d/8049.misc
0 → 100644
+
1
−
0
View file @
2f9fd5ab
Log `OPTIONS` requests at `DEBUG` rather than `INFO` level to reduce amount logged at `INFO`.
This diff is collapsed.
Click to expand it.
synapse/http/site.py
+
7
−
1
View file @
2f9fd5ab
...
@@ -319,7 +319,13 @@ class SynapseRequest(Request):
...
@@ -319,7 +319,13 @@ class SynapseRequest(Request):
def
_should_log_request
(
self
)
->
bool
:
def
_should_log_request
(
self
)
->
bool
:
"""
Whether we should log at INFO that we processed the request.
"""
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
):
class
XForwardedForRequest
(
SynapseRequest
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment