Fix log output in crash report
With the changes to get rid of colorlog, we broke this, as e.g. {green} was an undefined key for the vanilla logging.Formatter used for the in-RAM log. Now we instead use a ColoredFormatter with colors turned off.
This commit is contained in:
parent
33236b5314
commit
6b4efc1822
@ -207,7 +207,8 @@ def _init_formatters(level, color, force_color):
|
||||
use_colorama: Whether to use colorama.
|
||||
"""
|
||||
console_fmt = EXTENDED_FMT if level <= logging.DEBUG else SIMPLE_FMT
|
||||
ram_formatter = logging.Formatter(EXTENDED_FMT, DATEFMT, '{')
|
||||
ram_formatter = ColoredFormatter(EXTENDED_FMT, DATEFMT, '{',
|
||||
use_colors=False)
|
||||
html_formatter = HTMLFormatter(EXTENDED_FMT_HTML, DATEFMT,
|
||||
log_colors=LOG_COLORS)
|
||||
if sys.stderr is None:
|
||||
|
Loading…
Reference in New Issue
Block a user