fix(pterodactyl): fixed websocket logging (only sends debug logs if the global logging level is set to verbose or trace)

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

View file

@ -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)