From 582a41beec8c843e27858bd16f3a830a22655973 Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Wed, 8 Jan 2025 16:50:08 +0100 Subject: [PATCH] remove datetime from printed WarnMessage --- src/de/p1st/monitor/main.py | 2 +- src/de/p1st/monitor/warn.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/de/p1st/monitor/main.py b/src/de/p1st/monitor/main.py index 83c8b30..c249369 100755 --- a/src/de/p1st/monitor/main.py +++ b/src/de/p1st/monitor/main.py @@ -6,7 +6,7 @@ from pathlib import Path from de.p1st.monitor.cfg.singleton import init_cfg from de.p1st.monitor.cfg.loggers import get_loggers from de.p1st.monitor.logger_ex import LoggerReadEx -from de.p1st.monitor.print_util import print_err, print_debug +from de.p1st.monitor.print_util import print_err def main(): diff --git a/src/de/p1st/monitor/warn.py b/src/de/p1st/monitor/warn.py index 92a25cf..2e7f651 100644 --- a/src/de/p1st/monitor/warn.py +++ b/src/de/p1st/monitor/warn.py @@ -74,6 +74,5 @@ class WarnMessage: if self.level == WarnLevel.NONE: raise ValueError() if self.level > WarnLevel.NORMAL: - return f'[CRITICAL] {self.date}: ' - return f'{self.date}: ' - + return f'[CRITICAL] ' + return f''