#12632 closed defect (fixed)
TracError while post-processing leads noisy logging — at Version 6
Reported by: | Jun Omae | Owned by: | Jun Omae |
---|---|---|---|
Priority: | normal | Milestone: | 1.0.14 |
Component: | general | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: |
|
||
API Changes: | |||
Internal Changes: |
Description (last modified by )
TracError
while executing process_request()
is logged with WARNING level and no traceback. However, same exception while post-processing is logged with ERROR level and traceback. That's noisy….
See gmessage:trac-users:4tVRBotYrZs/NB3ZjUYjCAAJ.
-
trac/web/main.py
diff --git a/trac/web/main.py b/trac/web/main.py index 34a43039c..6406f54b3 100644
a b class RequestDispatcher(Component): 280 280 except RequestDone: 281 281 raise 282 282 except Exception, e: 283 self.log.error("Exception caught while post-processing" 284 " request: %s", 285 exception_to_unicode(e, traceback=True)) 283 self.log.error( 284 "Exception caught while post-processing request: %s", 285 exception_to_unicode( 286 e, traceback=not isinstance(TracError, e))) 286 287 raise err[0], err[1], err[2] 287 288 except PermissionError, e: 288 289 raise HTTPForbidden(e)
Change History (6)
comment:2 by , 7 years ago
Description: | modified (diff) |
---|
comment:3 by , 7 years ago
Yeah, I agree we don't need traceback in case of TracError
. I think it could be moved to milestone:next-stable-1.2.x.
comment:4 by , 7 years ago
Milestone: | next-stable-1.0.x → 1.2.1 |
---|---|
Owner: | set to |
Status: | new → assigned |
Okay. I'll push 2nd patch to 1.2-stable branch.
comment:5 by , 7 years ago
I have no problem if you'd like to push to 1.0-stable, I was just thinking that in general we won't be doing as many fixes on that branch since 1.2 is released. I won't get around to releasing 1.0.14 for at least another 24 hours or so, so the change could be included in that release if you felt it was needed.
comment:6 by , 7 years ago
Milestone: | 1.2.1 → 1.0.14 |
---|---|
Release Notes: | modified (diff) |
Resolution: | → fixed |
Status: | assigned → closed |
Thanks. I reconsider it should be pushed to 1.0-stable. Committed to 1.0-stable in [15290] and merged in [15291-15292].
After [15290], TracError
while post-processing is logged like this:
2016-12-07 17:35:17,894 Trac[main] WARNING: Exception caught while post-processing request: TracError: #12632 2016-12-07 17:35:17,894 Trac[main] WARNING: [192.168.11.21] HTTPInternalError: 500 Trac Error (#12632)
Other exceptions while post-processing is logged like this:
2016-12-07 17:38:17,646 Trac[main] ERROR: Exception caught while post-processing request: Traceback (most recent call last): File "/src/tracdev/svn/branches/1.0-stable/trac/web/main.py", line 279, in dispatch self._post_process_request(req) File "/src/tracdev/svn/branches/1.0-stable/trac/web/main.py", line 403, in _post_process_request f.post_process_request(req, *(None,)*extra_arg_count) File "/var/trac/1.0-sqlite/plugins/t12632.py", line 12, in post_process_request raise TypeError('#12632') TypeError: #12632 2016-12-07 17:38:17,646 Trac[main] ERROR: Internal Server Error: <RequestWithSession "GET '/about'">, referrer None Traceback (most recent call last): File "/src/tracdev/svn/branches/1.0-stable/trac/web/main.py", line 567, in _dispatch_request dispatcher.dispatch(req) File "/src/tracdev/svn/branches/1.0-stable/trac/web/main.py", line 259, in dispatch self._post_process_request(req, *resp) File "/src/tracdev/svn/branches/1.0-stable/trac/web/main.py", line 401, in _post_process_request resp = f.post_process_request(req, *resp) File "/var/trac/1.0-sqlite/plugins/t12632.py", line 12, in post_process_request raise TypeError('#12632') TypeError: #12632
Or:
trac/web/main.py