File: __init__.py

package info (click to toggle)
python-colorlog 6.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 224 kB
  • sloc: python: 694; makefile: 5
file content (66 lines) | stat: -rw-r--r-- 1,180 bytes parent folder | download | duplicates (2)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
"""A logging formatter for colored output."""

import sys
import warnings

from colorlog.formatter import (
    ColoredFormatter,
    LevelFormatter,
    TTYColoredFormatter,
    default_log_colors,
)
from colorlog.wrappers import (
    CRITICAL,
    DEBUG,
    ERROR,
    FATAL,
    INFO,
    NOTSET,
    StreamHandler,
    WARN,
    WARNING,
    basicConfig,
    critical,
    debug,
    error,
    exception,
    getLogger,
    info,
    log,
    root,
    warning,
)

__all__ = (
    "CRITICAL",
    "DEBUG",
    "ERROR",
    "FATAL",
    "INFO",
    "NOTSET",
    "WARN",
    "WARNING",
    "ColoredFormatter",
    "LevelFormatter",
    "StreamHandler",
    "TTYColoredFormatter",
    "basicConfig",
    "critical",
    "debug",
    "default_log_colors",
    "error",
    "exception",
    "exception",
    "getLogger",
    "info",
    "log",
    "root",
    "warning",
)

if sys.version_info < (3, 6):
    warnings.warn(
        "Colorlog requires Python 3.6 or above. Pin 'colorlog<5' to your dependencies "
        "if you require compatibility with older versions of Python. See "
        "https://github.com/borntyping/python-colorlog#status for more information."
    )