unify error reporting utility with Site Error log

Bug #98422 reported by Martijn Faassen on 2006-08-24
2
Affects Status Importance Assigned to Milestone
zope.error
Medium
Unassigned

Bug Description

I was making the assumption that any error that shows up in the error reporting utility in the ZMI is also copied to the SiteError log (typically STDOUT in a standard Zope 3 configuration), and vice versa. This assumption is true in Zope 2, where in the error_log object you can actually request the error to be logged to the shell as well.

It however does not appear to be the case in the error handling logic in Zope 3. Instead, all errors appear to be logged to the error reporting utility, but only errors that:

* have views

* have this view provide the ISystemErrorView interface

* and have a method on this view isSystemError() returning True

appear to get logged to the SiteError log (and thus STDOUT).

In certain circumstances this leads to errors that do not appear on STDOUT that do get logged into the error reporting utility. This is, at least to me, rather surprising. It also makes it impossible for the error reporting utility to set policy on which errors get reported, at least for the SiteError log. It isn't currently setting such policy,
but it might do so in the future.

What's the motivation for the differences? My suggestion is to unify
the error reporting utility with the SiteError code, so that the utility is always responsible for logging to the SiteError log as well.

The logic to be refactored is in zope.app.publication.ZopePublication,
in the method handleException.

Since this is sort of a proposal as well, Martijn put it up into the proposal wiki: http://dev.zope.org/Zope3/ErrorReportingUnification

Tres Seaver (tseaver) on 2010-04-15
Changed in zope3:
status: New → Triaged
affects: zope3 → zope.error
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers