Skip to content

Commit

Permalink
--onlyrelevant replaced with --silent
Browse files Browse the repository at this point in the history
  • Loading branch information
c0m4r authored Jan 10, 2024
1 parent 0e8502b commit 35daa89
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/lokilogger.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class LokiLogger:
warnings = 0
notices = 0
messagecount = 0
only_relevant = False
silent = False
debug = False
linesep = "\n"

Expand All @@ -62,15 +62,15 @@ def __init__(
log_file: str,
hostname: str,
csv: bool,
only_relevant: bool,
silent: bool,
debug: bool,
):
self.version = __version__
self.no_log_file = no_log_file
self.log_file = log_file
self.hostname = hostname
self.csv = csv
self.only_relevant = only_relevant
self.silent = silent
self.debug = debug

# Colorization
Expand All @@ -96,7 +96,7 @@ def log(self, mes_type, module, message) -> None:
self.notices += 1
self.messagecount += 1

if self.only_relevant:
if self.silent:
if mes_type not in ("ALERT", "WARNING"):
return

Expand Down

0 comments on commit 35daa89

Please sign in to comment.