Enriching logging library of python.
- python >= 3.4
pip3 install richlogging
- Basic usage
from richlogging import *
_logger = Logger([logger_name])
_logger.logger.debug([message])
_logger.logger.info([message])
_logger.logger.warn([message])
_logger.logger.error([message])
_logger.logger.critical([message])
Or you can customized color mapping by overrwriting ColorMapping class.
Add class below:
class MyColorMap(ColorMapping):
DEBUG = "\x1b[38;5;255m"
INFO = "\x1b[38;5;252m"
WARNING = "\x1b[38;5;248m"
ERROR = "\x1b[38;5;244m"
CRITICAL = "\x1b[38;5;232m"