~launchpad-pqm/launchpad/devel

11300.2.44 by Stuart Bishop
Tidy custom loglevels into their own module, and initialize filtering and custom levels in lp_sitecustomize.py for great justice.
1
# Copyright 2010 Canonical Ltd.  This software is licensed under the
2
# GNU Affero General Public License version 3 (see the file LICENSE).
3
4
"""Standard and custom log levels from the standard logging package.
5
6
Custom log levels are registered in lp_sitecustomize.py.
7
"""
8
9
__metaclass__ = type
10
__all__ = [
11
    'CRITICAL',
12
    'DEBUG',
11300.2.49 by Stuart Bishop
Tidy and improve logging system infrastructure for great justice.
13
    'DEBUG1',
11300.2.44 by Stuart Bishop
Tidy custom loglevels into their own module, and initialize filtering and custom levels in lp_sitecustomize.py for great justice.
14
    'DEBUG2',
15
    'DEBUG3',
16
    'DEBUG4',
17
    'DEBUG5',
18
    'DEBUG6',
19
    'DEBUG7',
20
    'DEBUG8',
21
    'DEBUG9',
11300.2.49 by Stuart Bishop
Tidy and improve logging system infrastructure for great justice.
22
    'ERROR',
23
    'FATAL',
11300.2.44 by Stuart Bishop
Tidy custom loglevels into their own module, and initialize filtering and custom levels in lp_sitecustomize.py for great justice.
24
    'INFO',
25
    'WARNING',
26
    ]
27
11300.2.49 by Stuart Bishop
Tidy and improve logging system infrastructure for great justice.
28
29
import logging
30
31
32
# Reexport standard log levels.
33
DEBUG = logging.DEBUG
34
INFO = logging.INFO
35
WARNING = logging.WARNING
36
ERROR = logging.ERROR
37
CRITICAL = logging.CRITICAL
38
FATAL = logging.FATAL
39
11300.2.44 by Stuart Bishop
Tidy custom loglevels into their own module, and initialize filtering and custom levels in lp_sitecustomize.py for great justice.
40
41
# Custom log levels.
11300.2.49 by Stuart Bishop
Tidy and improve logging system infrastructure for great justice.
42
DEBUG1 = DEBUG
11300.2.44 by Stuart Bishop
Tidy custom loglevels into their own module, and initialize filtering and custom levels in lp_sitecustomize.py for great justice.
43
DEBUG2 = DEBUG - 1
44
DEBUG3 = DEBUG - 2
45
DEBUG4 = DEBUG - 3
46
DEBUG5 = DEBUG - 4
47
DEBUG6 = DEBUG - 5
48
DEBUG7 = DEBUG - 6
49
DEBUG8 = DEBUG - 7
50
DEBUG9 = DEBUG - 8