From c0195f44f610a35809ee409630854d69fe4d4ede Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Thu, 7 Mar 2024 16:48:40 -0500 Subject: [PATCH] fix(pterodactyl): fixed websocket logging (only sends debug logs if the global logging level is set to verbose or trace) --- pterodactyl/logger.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pterodactyl/logger.py b/pterodactyl/logger.py index 482fefc..ef33dd8 100644 --- a/pterodactyl/logger.py +++ b/pterodactyl/logger.py @@ -1,4 +1,10 @@ +import logging + from red_commons.logging import getLogger logger = getLogger('red.seacogs.pterodactyl') websocket_logger = getLogger('red.seacogs.pterodactyl.websocket') +if logger.level == logging.DEBUG: + websocket_logger.setLevel(logging.INFO) +elif logger.level < logging.DEBUG: + websocket_logger.setLevel(logging.DEBUG)