2020-04-27 23:07:15 +10:00
|
|
|
"""Pylint tells me this module should have a docstring.
|
|
|
|
So here it is.
|
|
|
|
"""
|
|
|
|
import logging
|
|
|
|
|
2020-04-28 04:28:53 +10:00
|
|
|
__version__ = "0.0.7"
|
2020-04-27 23:07:15 +10:00
|
|
|
__snake__ = r"""
|
2020-04-15 16:45:22 +10:00
|
|
|
_________ _________
|
2020-04-27 23:07:15 +10:00
|
|
|
/ \ / \
|
|
|
|
/ /~~~~~\ \ / /~~~~~\ \
|
2020-04-15 16:45:22 +10:00
|
|
|
| | | | | | | |
|
|
|
|
| | | | | | | |
|
|
|
|
| | | | | | | | /
|
|
|
|
| | | | | | | | //
|
|
|
|
(o o) \ \_____/ / \ \_____/ /
|
|
|
|
\__/ \ / \ /
|
|
|
|
| ~~~~~~~~~ ~~~~~~~~
|
|
|
|
^
|
|
|
|
"""
|
2020-04-27 23:07:15 +10:00
|
|
|
|
|
|
|
LOG_LEVELS = {
|
|
|
|
0: {"level": logging.CRITICAL, "format": u"[%(asctime)s] %(message)s"},
|
|
|
|
1: {
|
|
|
|
"level": logging.ERROR,
|
|
|
|
"format": u"[%(asctime)s] [%(levelname)s] %(message)s",
|
|
|
|
},
|
|
|
|
2: {"level": logging.WARN, "format": u"[%(asctime)s] [%(levelname)s] %(message)s"},
|
|
|
|
3: {"level": logging.INFO, "format": u"[%(asctime)s] [%(levelname)s] %(message)s"},
|
|
|
|
4: {
|
|
|
|
"level": logging.DEBUG,
|
|
|
|
"format": u"[%(asctime)s] [%(levelname)s] %(filename)s:%(lineno)d: %(message)s",
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2020-04-15 16:15:56 +10:00
|
|
|
# TODO: make it usable as a module too
|