fix(pterodactyl): fixed websocket logging (only sends debug logs if the global logging level is set to verbose or trace)
Some checks failed
Actions / Lint Code (Ruff & Pylint) (push) Failing after 24s
Actions / Build Documentation (MkDocs) (push) Successful in 28s

This commit is contained in:
Seaswimmer 2024-03-07 16:48:40 -05:00
parent fdb785ffd7
commit c0195f44f6
Signed by: cswimr
GPG key ID: B8953EC01E5C4063

View file

@ -1,4 +1,10 @@
import logging
from red_commons.logging import getLogger from red_commons.logging import getLogger
logger = getLogger('red.seacogs.pterodactyl') logger = getLogger('red.seacogs.pterodactyl')
websocket_logger = getLogger('red.seacogs.pterodactyl.websocket') 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)