From c3646043ffaddbe18143c2c3d76960141dc9cb1d Mon Sep 17 00:00:00 2001 From: "Jarisch, Ferdinand" Date: Wed, 20 Sep 2023 13:35:07 +0200 Subject: [PATCH] fixup! feat(log): Add --no-volatile-info as class option to all scanners --- src/gallia/log.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/gallia/log.py b/src/gallia/log.py index 622ff7e84..c224de74b 100644 --- a/src/gallia/log.py +++ b/src/gallia/log.py @@ -405,15 +405,11 @@ def _format_record( # noqa: PLR0913 else: msg += data - if volatile_info: + if volatile_info and levelno <= Loglevel.INFO: terminal_width, _ = shutil.get_terminal_size() - msg = msg[: terminal_width + extra_len] # Adapt length to invisible ANSI colors + msg = msg[: terminal_width + extra_len - 1] # Adapt length to invisible ANSI colors msg += _Color.RESET.value - - if levelno <= Loglevel.INFO: - msg += "\r" - else: - msg += "\n" + msg += "\r" else: msg += "\n"