Main refactoring

This commit is contained in:
2024-11-10 15:03:44 +01:00
parent 28fdfa0982
commit 9a0f869839
20 changed files with 2349 additions and 2280 deletions
+20
View File
@@ -0,0 +1,20 @@
import logging
from logging import handlers
logger = logging.getLogger("discord")
logger.setLevel(logging.DEBUG)
handler = handlers.RotatingFileHandler(
filename="test.log",
encoding="utf-8",
mode="a",
maxBytes=6 * 1024 * 1024,
backupCount=6,
)
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
handler.setFormatter(formatter)
logger.addHandler(handler)
logger2 = logging.getLogger("discord")
for item in logger2.handlers:
print(item)