v1.0.0b2
All checks were successful
Build Docker Image / build (push) Successful in 36s

This commit is contained in:
2025-11-28 04:51:21 -06:00
parent 9392eded43
commit 70f64f1766
8 changed files with 59 additions and 50 deletions

View File

@@ -1,16 +1,12 @@
import os
import logging
from main import logfile
# Setup logging
def setup_log():
loglevel = 10 if os.getenv("APKG_TARGET") == "debug" else 20
# 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)
logging.basicConfig(
format="%(asctime)s %(levelname)s %(message)s",
datefmt="%Y-%m-%d %H:%M:%S",
level=loglevel
)