Centralized logging

Allows us to extend the logging infrastructure, e.g. by adding Loki/Discord webhooks to the mix.
This commit is contained in:
2024-04-20 12:11:37 +00:00
parent 36ab38b1ee
commit 994fa0d41e
136 changed files with 340 additions and 847 deletions

View File

@ -8,6 +8,7 @@ import jwt
from base64 import b64decode
from datetime import datetime, timezone
import core.logger
from .config import CoreConfig
class Utils:
@ -28,7 +29,7 @@ class Utils:
ret[dir] = mod
except ImportError as e:
logging.getLogger("core").error(f"get_all_titles: {dir} - {e}")
core.logger.create_logger("Core").error(f"get_all_titles: {dir} - {e}")
raise
return ret