From 7ffcffc8519909187e79605f073d50ddd4970e89 Mon Sep 17 00:00:00 2001 From: Kumi Date: Fri, 16 Sep 2022 11:55:27 +0000 Subject: [PATCH] Replace custom logger --- src/reportmonster/classes/logger.py | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/src/reportmonster/classes/logger.py b/src/reportmonster/classes/logger.py index f452d32..a712338 100644 --- a/src/reportmonster/classes/logger.py +++ b/src/reportmonster/classes/logger.py @@ -1,21 +1,5 @@ import logging -import threading - -from datetime import datetime -class Logger: - @staticmethod - def _format(message: str, severity: str) -> str: - thread = threading.current_thread().name - datestr = str(datetime.now()) - return f"{datestr} - {thread} - {severity} - {message}" - - def debug(self, message: str) -> None: - print(self.__class__()._format(message, "DEBUG")) - - def info(self, message: str) -> None: - print(self.__class__()._format(message, "INFO")) - - def error(self, message: str) -> None: - print(self.__class__()._format(message, "ERROR")) \ No newline at end of file +class Logger(logging.Logger): + name = "ReportMonster"