quteproc: fix log_color in log message

This actually uses the escape code, not just the color name.
This commit is contained in:
Daniel Schadt 2016-05-25 20:55:16 +02:00
parent ae16240d41
commit b4022b9795

View File

@ -95,9 +95,10 @@ class LogLine(testprocess.Line):
This returns a line like qute without --json-logging would produce. This returns a line like qute without --json-logging would produce.
""" """
log_color = log.LOG_COLORS[self.levelname]
format_dict = { format_dict = {
'asctime': self.timestamp.strftime(log.DATEFMT), 'asctime': self.timestamp.strftime(log.DATEFMT),
'log_color': log.LOG_COLORS[self.levelname], 'log_color': log.ColoredFormatter.COLOR_ESCAPES[log_color],
'levelname': self.levelname, 'levelname': self.levelname,
'reset': log.ColoredFormatter.RESET_ESCAPE, 'reset': log.ColoredFormatter.RESET_ESCAPE,
'name': self.category, 'name': self.category,