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
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 |
The 'error_reports' section is used if section_name is None.
This is the log subtype + anything set via setOopsToken.
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.
Parameters | now | The datetime to use as the current time. Will be determined if not supplied. Useful for testing. Not part of IErrorReportingUtility). |
Parameters | info | Output of sys.exc_info() |
request | The IErrorReportRequest which provides context to the info. | |
now | The datetime to use as the current time. Will be determined if not supplied. Useful for testing. | |
informational | If true, the report is flagged as informational only. |
Parameters | info | Output of sys.exc_info() |
request | The IErrorReportRequest which provides context to the info. | |
now | The datetime to use as the current time. Will be determined if not supplied. Useful for testing. | |
Returns | The ErrorReport created. |