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

@ -1,9 +1,9 @@
import logging
from datetime import datetime, timedelta
from random import randint
from typing import Dict
import pytz
import core.logger
from core.config import CoreConfig
from core.utils import Utils
from titles.chuni.const import ChuniConstants
@ -19,7 +19,7 @@ class ChuniNew(ChuniBase):
self.game_cfg = game_cfg
self.data = ChuniData(core_cfg)
self.date_time_format = "%Y-%m-%d %H:%M:%S"
self.logger = logging.getLogger("chuni")
self.logger = core.logger.create_logger("Chunithm", logger_name="chuni")
self.game = ChuniConstants.GAME_CODE
self.version = ChuniConstants.VER_CHUNITHM_NEW