From 6f239140895e7e9fcea96f68f853c5a304d92d60 Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Thu, 31 Dec 2020 11:57:44 -0500 Subject: [PATCH] Fix NoxColoredFormatter.format (#374) That method is making use of `_simple_fmt`, but isn't defined in the class. I used the same value as `NoxFormatter` --- nox/logger.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nox/logger.py b/nox/logger.py index 84d5fcca..599cc238 100644 --- a/nox/logger.py +++ b/nox/logger.py @@ -63,6 +63,7 @@ def __init__( reset=reset, secondary_log_colors=secondary_log_colors, ) + self._simple_fmt = logging.Formatter("%(message)s") def format(self, record: Any) -> str: if record.levelname == "OUTPUT": @@ -72,7 +73,7 @@ def format(self, record: Any) -> str: class LoggerWithSuccessAndOutput(logging.getLoggerClass()): # type: ignore def __init__(self, name: str, level: int = logging.NOTSET): - super(LoggerWithSuccessAndOutput, self).__init__(name, level) + super().__init__(name, level) logging.addLevelName(SUCCESS, "SUCCESS") logging.addLevelName(OUTPUT, "OUTPUT")