This commit is contained in:
Hell13Cat
2026-05-26 22:07:03 +03:00
parent bdb9d599bd
commit 535ab65fa4
6 changed files with 85 additions and 8 deletions
+2 -3
View File
@@ -1,13 +1,12 @@
import logging
class Logger:
def __init__(self, name):
self.name = name
def __init__(self):
self.logger_file = logging.getLogger(__name__)
self.logger_cli = logging.getLogger(__name__)
formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s')
file_handler = logging.FileHandler("logs/"+self.name+".log", encoding="utf-8")
file_handler = logging.FileHandler("logs.log", encoding="utf-8")
file_handler.setFormatter(formatter)
console_handler = logging.StreamHandler()