Debian Codegraph @

pecan/log.py

raw
1 import logging
2
3 from warnings import warn
4
5
6 class ColorFormatter(logging.Formatter):
7
8 def __init__(self, _logging=None, colorizer=None, *a, **kw):
9 logging.Formatter.__init__(self, *a, **kw)
10 warn(
11 'pecan.log.ColorFormatter is no longer supported; '
12 'consider an alternative library such as '
13 'https://pypi.org/project/colorlog/',
14 DeprecationWarning
15 )
16
17 def format(self, record):
18 record.color_levelname = ''
19 record.padded_color_levelname = record.levelname
20 return logging.Formatter.format(self, record)