c.l.w.e.ErrorReportingUtility : class documentation

Part of canonical.launchpad.webapp.errorlog View In Hierarchy

Known subclasses: canonical.launchpad.mail.incoming.MailErrorUtility, lp.bugs.scripts.checkwatches.base.CheckWatchesErrorUtility, lp.services.mailman.monkeypatches.xmlrpcrunner.MailmanErrorUtility

Implements interfaces: zope.error.interfaces.IErrorReportingUtility

No class docstring
Method __init__ Undocumented
Method configure Configure the utility using the named section from the config.
Method setOopsToken Undocumented
Method oops_prefix Get the current effective oops prefix.
Method getOopsReport Return the contents of the OOPS report logged at 'time'.
Method getLastOopsReport Return the last ErrorReport reported with the current config.
Method raising See IErrorReportingUtility.raising()
Method handling Flag ErrorReport as informational only.
Method oopsMessage Add an oops message to be included in oopses from this context.
Method _raising Private method used by raising() and handling().
Method _makeErrorReport Return an ErrorReport for the supplied data.
Method _do_copy_to_zlog Undocumented
def __init__(self):
Undocumented
def configure(self, section_name=None):
Configure the utility using the named section from the config.

The 'error_reports' section is used if section_name is None.

def setOopsToken(self, token):
Undocumented
@property
def oops_prefix(self):
Get the current effective oops prefix.

This is the log subtype + anything set via setOopsToken.

def getOopsReport(self, time):
Return the contents of the OOPS report logged at 'time'.
def getLastOopsReport(self):
Return the last ErrorReport reported with the current config.

This should only be used in integration tests.

Note that this function only checks for OOPSes reported today and yesterday (to avoid midnight bugs where an OOPS is logged at 23:59:59 but not checked for until 0:00:01), and ignores OOPSes recorded longer ago.

Returns None if no OOPS is found.

def raising(self, info, request=None, now=None):
See IErrorReportingUtility.raising()
ParametersnowThe datetime to use as the current time. Will be determined if not supplied. Useful for testing. Not part of IErrorReportingUtility).
def _raising(self, info, request=None, now=None, informational=False):
Private method used by raising() and handling().
def _makeErrorReport(self, info, request=None, now=None, informational=False):
Return an ErrorReport for the supplied data.
ParametersinfoOutput of sys.exc_info()
requestThe IErrorReportRequest which provides context to the info.
nowThe datetime to use as the current time. Will be determined if not supplied. Useful for testing.
informationalIf true, the report is flagged as informational only.
def handling(self, info, request=None, now=None):
Flag ErrorReport as informational only.
ParametersinfoOutput of sys.exc_info()
requestThe IErrorReportRequest which provides context to the info.
nowThe datetime to use as the current time. Will be determined if not supplied. Useful for testing.
ReturnsThe ErrorReport created.
def _do_copy_to_zlog(self, now, strtype, url, info, oopsid):
Undocumented
@contextlib.contextmanager
def oopsMessage(self, message):
Add an oops message to be included in oopses from this context.
API Documentation for Launchpad, generated by pydoctor at 2010-09-27 00:00:11.