We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2af42da commit 3c818bcCopy full SHA for 3c818bc
alphaconf/logging_util.py
@@ -21,6 +21,7 @@
21
logging.WARNING: colorama.Fore.YELLOW,
22
logging.INFO: colorama.Fore.GREEN,
23
# logging.DEBUG: colorama.Fore.LIGHTBLACK_EX,
24
+ -1: colorama.Style.RESET_ALL, # reset
25
}
26
27
"""Fields of a default log record"""
@@ -43,7 +44,7 @@ class ColorFormatter(Formatter):
43
44
def formatMessage(self, record): # noqa: N802
45
# we can change the message because each call to format() resets it
46
if record.levelno in LOG_COLORS:
- record.message = LOG_COLORS[record.levelno] + record.message + colorama.Style.RESET_ALL
47
+ record.message = LOG_COLORS[record.levelno] + record.message + LOG_COLORS[-1]
48
return super().formatMessage(record)
49
50
0 commit comments