~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/services/mailman/doc/logging.txt

  • Committer: Launchpad Patch Queue Manager
  • Date: 2012-01-01 02:41:30 UTC
  • mfrom: (14612.1.3 mailman-tests-unbitrot)
  • Revision ID: launchpad@pqm.canonical.com-20120101024130-8jz8mbz8kfrufcnz
[r=wgrant][no-qa] Unbitrot mailman OOPS handling and tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
The Mailman XMLRPCRunner logs errors and reports OOPSes.
6
6
 
7
7
 
8
 
MailmanErrorUtility
9
 
===================
10
 
 
11
 
The MailmanErrorUtility is a ErrorReportingUtility that is configured
12
 
in the [mailman] section of config.
13
 
 
14
 
    >>> from lp.services.config import config
15
 
    >>> from lp.services.mailman.monkeypatches.xmlrpcrunner import (
16
 
    ...     MailmanErrorUtility)
17
 
 
18
 
    >>> error_utility = MailmanErrorUtility()
19
 
    >>> print error_utility._default_config_section
20
 
    mailman
21
 
 
22
 
    >>> print error_utility.oops_prefix
23
 
    TMMX
24
 
    >>> print config.mailman.oops_prefix
25
 
    TMMX
26
 
 
27
 
    >>> print error_utility.log_namer._output_root
28
 
    /var/tmp/mailman-xmlrpc.test
29
 
    >>> print config.mailman.error_dir
30
 
    /var/tmp/mailman-xmlrpc.test
31
 
 
32
 
 
33
8
Error logging
34
9
=============
35
10
 
52
27
    >>> test_log_exception()
53
28
    >>> oops = capture.oopses[0]
54
29
    >>> capture.cleanUp()
 
30
    >>> print oops['reporter']
 
31
    T-mailman
55
32
    >>> print oops['id']
56
 
    OOPS-...TMMX...
 
33
    OOPS-...
57
34
    >>> print oops['type']
58
35
    AssertionError
59
36
    >>> print oops['value']