forked from goodboy/tractor
Flip "trace" level to "transport" level logging
parent
bd71e49f89
commit
62a81a7e73
|
@ -29,7 +29,7 @@ LOG_FORMAT = (
|
|||
DATE_FORMAT = '%b %d %H:%M:%S'
|
||||
LEVELS = {
|
||||
'GARBAGE': 1,
|
||||
'TRACE': 5,
|
||||
'TRANSPORT': 5,
|
||||
'RUNTIME': 15,
|
||||
'PDB': 500,
|
||||
'QUIET': 1000,
|
||||
|
@ -42,7 +42,7 @@ STD_PALETTE = {
|
|||
'INFO': 'green',
|
||||
'RUNTIME': 'white',
|
||||
'DEBUG': 'white',
|
||||
'TRACE': 'cyan',
|
||||
'TRANSPORT': 'cyan',
|
||||
'GARBAGE': 'blue',
|
||||
}
|
||||
BOLD_PALETTE = {
|
||||
|
@ -77,7 +77,7 @@ def get_logger(
|
|||
# additional levels
|
||||
for name, val in LEVELS.items():
|
||||
logging.addLevelName(val, name)
|
||||
# ex. create ``logger.trace()``
|
||||
# ex. create ``logger.runtime()``
|
||||
setattr(logger, name.lower(), partial(logger.log, val))
|
||||
|
||||
return logger
|
||||
|
|
Loading…
Reference in New Issue