log¶
| CLASS | DESCRIPTION |
|---|---|
MillisecondFormatter |
A formatter for standard library 'logging' that supports '%f' wildcard in format strings. |
ColoredFormatter |
Formatter to add colors based on |
COLORS
module-attribute
¶
COLORS = {
"WARNING": YELLOW,
"INFO": GREY,
"DEBUG": ORANGE,
"CRITICAL": YELLOW,
"ERROR": RED,
}
MillisecondFormatter
¶
Bases: Formatter
A formatter for standard library 'logging' that supports '%f' wildcard in format strings.
formatTime
¶
formatTime(record, datefmt=None)
Source code in src/downmixer/log/__init__.py
27 28 29 30 31 32 33 34 | |
ColoredFormatter
¶
Bases: Formatter
Formatter to add colors based on levelname, following the COLORS constant.
format
¶
format(record)
Source code in src/downmixer/log/__init__.py
40 41 42 43 44 45 46 47 48 49 | |
formatter_message
¶
formatter_message(message, use_color=True)
Source code in src/downmixer/log/__init__.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | |
setup_logging
¶
setup_logging(debug: bool = False)
Source code in src/downmixer/log/__init__.py
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | |