def format(self, record: logging.LogRecord) -> str: levelname = record.levelname if use_color: record.color = _LOG_COLORS[levelname].value # type: ignore record.reset = Colors.RESET.value # type: ignore else: record.color, record.reset = "", "" # type: ignore return logging.Formatter.format(self, record)
def format(self, record: LogRecord) -> str: record.color = self.parse_color(record.levelname) record.pathname = record.pathname.replace("\\", "/") return unset_color(super(LogFormatter, self).format(record))