From 6b4efc18222c08066af20be1c9a48946840d846b Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 15 May 2016 10:46:46 +0200 Subject: [PATCH] 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. --- qutebrowser/utils/log.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qutebrowser/utils/log.py b/qutebrowser/utils/log.py index 577383e1b..16b197873 100644 --- a/qutebrowser/utils/log.py +++ b/qutebrowser/utils/log.py @@ -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: