Commit a8e3b483 authored by Ilias Tsitsimpis's avatar Ilias Tsitsimpis
Browse files

burnin: Fix a bug with logging.Formatter

The attribute 'msg` contains the unformatted string passed in the
original logging call. We should use the `message' attribute which is
the logged message, computed as msg % args.
parent 4e21eaf8
......@@ -174,11 +174,11 @@ class BurninTestResult(unittest.TextTestResult):
# --------------------------------------------------------------------
# Format Results
class burninFormatter(logging.Formatter):
err_fmt = red + "ERROR: %(msg)s" + normal
dbg_fmt = green + "* %(msg)s" + normal
info_fmt = "%(msg)s"
err_fmt = red + "ERROR: %(message)s" + normal
dbg_fmt = green + "* %(message)s" + normal
info_fmt = "%(message)s"
def __init__(self, fmt="%(levelno)s: %(msg)s"):
def __init__(self, fmt="%(levelno)s: %(message)s"):
logging.Formatter.__init__(self, fmt)
def format(self, record):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment