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

@ -4,6 +4,7 @@ import socket
from socketserver import BaseRequestHandler, TCPServer
from typing import Tuple
import core.logger
from core.config import CoreConfig
from titles.idac.config import IDACConfig
from titles.idac.database import IDACData
@ -25,7 +26,7 @@ class IDACEchoTCP(BaseRequestHandler):
) -> None:
self.core_config = cfg
self.game_config = game_cfg
self.logger = logging.getLogger("idac")
self.logger = core.logger.create_logger("IDAC")
self.data = IDACData(cfg)
super().__init__(request, client_address, server)