Skip to content

Commit

Permalink
fixup! feat(log): Add --no-volatile-info as class option to all scanners
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdinandjarisch committed Sep 20, 2023
1 parent ccd88c9 commit c364604
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/gallia/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit c364604

Please sign in to comment.