diff --git a/akibabot/logging.py b/akibabot/logging.py index a52c016..9b96c99 100644 --- a/akibabot/logging.py +++ b/akibabot/logging.py @@ -8,9 +8,8 @@ def init_loki_logging(config: dict[str, str]): """Configures the logging to Loki.""" import logging_loki - queue = Queue(-1) - handler = logging.handlers.QueueHandler(queue) - handler_loki = logging_loki.LokiHandler( + handler = logging_loki.LokiQueueHandler( + Queue(-1), url=config["loki"]["url"], version="1", tags={ @@ -22,7 +21,6 @@ def init_loki_logging(config: dict[str, str]): datefmt="%Y-%m-%d-%H:%M:%S", ) handler.setFormatter(formatter) - logging.handlers.QueueListener(queue, handler_loki) logging.getLogger().addHandler(handler)