summaryrefslogtreecommitdiffstats
path: root/testing/mozbase/mozlog/mozlog/__init__.py
blob: 82d40b5c55181d7e665505756cc60e6415cc05d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

"""
Mozlog aims to standardize log handling and formatting within Mozilla.

It implements a JSON-based structured logging protocol with convenience
facilities for recording test results.

The old unstructured module is deprecated. It simply wraps Python's
logging_ module and adds a few convenience methods for logging test
results and events.
"""

import sys

from . import commandline, structuredlog, unstructured
from .proxy import get_proxy_logger
from .structuredlog import get_default_logger, set_default_logger

# Backwards compatibility shim for consumers that use mozlog.structured
structured = sys.modules[__name__]
sys.modules["{}.structured".format(__name__)] = structured

__all__ = [
    "commandline",
    "structuredlog",
    "unstructured",
    "get_default_logger",
    "set_default_logger",
    "get_proxy_logger",
    "structured",
]