From 54a0a0000d15210590fab1ba79ce18d85e940e74 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 20 Feb 2024 13:22:44 -0500 Subject: [PATCH] .log: more multi-line styling --- tractor/log.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tractor/log.py b/tractor/log.py index 590779a..6c04020 100644 --- a/tractor/log.py +++ b/tractor/log.py @@ -289,11 +289,19 @@ def get_console_log( if not level: return log - log.setLevel(level.upper() if not isinstance(level, int) else level) + log.setLevel( + level.upper() + if not isinstance(level, int) + else level + ) if not any( handler.stream == sys.stderr # type: ignore - for handler in logger.handlers if getattr(handler, 'stream', None) + for handler in logger.handlers if getattr( + handler, + 'stream', + None, + ) ): handler = logging.StreamHandler() formatter = colorlog.ColoredFormatter(