Edgewall Software

Opened 7 years ago

Last modified 7 years ago

#12632 closed defect

TracError while post-processing leads noisy logging — at Initial Version

Reported by: Jun Omae Owned by:
Priority: normal Milestone: 1.0.14
Component: general Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

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 https://groups.google.com/d/msg/trac-users/4tVRBotYrZs/NB3ZjUYjCAAJ googlegroups: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):  
    280280                except RequestDone:
    281281                    raise
    282282                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)))
    286287                raise err[0], err[1], err[2]
    287288        except PermissionError, e:
    288289            raise HTTPForbidden(e)

Change History (0)

Note: See TracTickets for help on using tickets.