diff --git a/lib/core/common.py b/lib/core/common.py index c8c1db0a5..21672ea5a 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -702,8 +702,11 @@ def setColor(message, bold=False): if level: kb.currentMessage = level - if hasattr(LOGGER_HANDLER, "level_map") and hasattr(kb, "currentMessage") and kb.currentMessage: + if bold: + retVal = colored(message, color=None, on_color=None, attrs=("bold",)) + elif hasattr(LOGGER_HANDLER, "level_map") and hasattr(kb, "currentMessage") and kb.currentMessage: _ = LOGGER_HANDLER.level_map.get(logging.getLevelName(kb.currentMessage)) + if _: background, foreground, bold = _ retVal = colored(message, color=foreground, on_color="on_%s" % background if background else None, attrs=("bold",) if bold else None)