Opened 10 years ago
Closed 9 years ago
#12016 closed enhancement (wontfix)
Use lower logging level for "HTTPNotFound"
Reported by: | Ryan J Ollos | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | general | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description (last modified by )
Similar to #12005, I wonder whether there is value to the administrator in logging HTTPNotFound
at WARNING
level. It seems more like noise to me, and makes it difficult to spot real issues in the log file.
2015-04-01 23:09:50,441 Trac[main] WARNING: [178.255.215.93] HTTPNotFound: 404 Trac Error (No version "1" for Wiki page "nori")
Perhaps we should use a lower logging level, such as DEBUG
or INFO
.
The sequence of events is:
ResourceNotFound
error raised.ResourceNotFound
trapped andHTTPNotFound
raised: tags/trac-1.0.5/trac/web/main.py@:261#L259HTTPNotFound
trapped and logged: tags/trac-1.0.5/trac/web/main.py@:518,527#L501
We could simply inspect the error code when determining how to log the error in _send_user_error
. Similarly, HTTPForbidden
could be logged at DEBUG
level. HTTPInternalError
could still be logged at WARNING
level.
How should HTTPBadRequest
be logged? Should all 4xx error codes be logged at DEBUG
or INFO
level?
Attachments (0)
Change History (4)
comment:1 by , 10 years ago
Description: | modified (diff) |
---|
comment:2 by , 10 years ago
comment:3 by , 10 years ago
Milestone: | 1.0.6 → undecided |
---|
Thanks, you are probably right. Let me think about it a bit more before closing the ticket.
comment:4 by , 9 years ago
Milestone: | undecided |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
Most of web servers, e.g. Apache, Nginx, …, log such messages with error level.
I think that is a general behavior and no need to change the level of logging….
In #12005, I suppose the auto-preview with unfinished text almost leads the noisy messages while editing ticket comment. I consider we should use a lower level.