Opened 9 years ago
Last modified 9 years ago
#12016 closed enhancement
Use lower logging level for "HTTPNotFound" — at Version 1
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?