This commit is contained in:
2025-11-27 03:09:03 -06:00
parent d05a462c4d
commit e78a8976e9
10 changed files with 422 additions and 24 deletions

16
logger.py Normal file
View File

@@ -0,0 +1,16 @@
import logging
from main import logfile
# Setup Logging
logging.basicConfig(filename=logfile,
encoding="utf-8",
filemode="a",
format="%(asctime)s %(name)s %(levelname)s %(message)s",
datefmt="%Y-%m-%d %H:%M:%S",
level=logging.INFO)
# Logging handler
## DEBUG (10), INFO (20), WARNING (30), ERROR (40), and CRITICAL (50)
def log(msg: str, level=20):
logging.log(level=level, msg=msg)