add support for precision bit in LEVEL_NAME_FMT regex

This commit is contained in:
Rahul Kumaresan 2021-05-07 00:45:52 +05:30
parent 634312b14a
commit 4b6188b3b1
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ class ColoredLevelFormatter(logging.Formatter):
logging.DEBUG: {"purple"},
logging.NOTSET: set(),
}
LEVELNAME_FMT_REGEX = re.compile(r"%\(levelname\)([+-.]?\d*s)")
LEVELNAME_FMT_REGEX = re.compile(r"%\(levelname\)([+-.]?\d*[.]?\d*s)")
def __init__(self, terminalwriter: TerminalWriter, *args, **kwargs) -> None:
super().__init__(*args, **kwargs)