From 2d197134f1631c124a3a7cbda0d45991f9e3e2d2 Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Wed, 9 Jul 2025 09:44:55 +0900 Subject: [PATCH] log splitter output make length configurable --- src/corelibs/logging_handling/log.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/corelibs/logging_handling/log.py b/src/corelibs/logging_handling/log.py index 5fcb75c..53e2d7a 100644 --- a/src/corelibs/logging_handling/log.py +++ b/src/corelibs/logging_handling/log.py @@ -15,6 +15,8 @@ class Log: EXCEPTION: int = 60 + SPACER_LENGTH: int = 32 + def __init__( self, log_path: Path, @@ -48,6 +50,7 @@ class Log: if not isinstance(getattr(logging, log_level_console.upper(), None), int): log_level_console = 'WARNING' console_handler = logging.StreamHandler() + # TODO Add flag based color handler formatter_console = logging.Formatter( ( '[%(asctime)s.%(msecs)03d] ' @@ -94,7 +97,7 @@ class Log: Keyword Arguments: info {str} -- _description_ (default: {"BREAK"}) """ - self.logger.info("[%s] ================================>", info) + self.logger.info("[%s] %s>", info, '=' * __class__.SPACER_LENGTH) def exception(self, msg: object, *args: object, extra: Mapping[str, object] | None = None) -> None: """