SeaCogs/pterodactyl/logger.py
SeaswimmerTheFsh ae31a61436
All checks were successful
Actions / Lint Code (Ruff & Pylint) (push) Successful in 18s
Actions / Build Documentation (MkDocs) (push) Successful in 23s
fix(pterodactyl): log websocket messages to VERBOSE (log level 5) and not DEBUG
2024-03-07 02:52:44 -05:00

14 lines
483 B
Python

import logging
logger = logging.getLogger('red.seacogs.pterodactyl')
class WebsocketLogger(logging.Logger):
def __init__(self, name, level=logging.NOTSET):
super().__init__(name, level)
def debug(self, msg, *args, **kwargs):
self.log(logging.VERBOSE, msg, *args, **kwargs)
logging.setLoggerClass(WebsocketLogger)
websocket_logger = logging.getLogger('red.seacogs.pterodactyl.websocket')
logging.VERBOSE = 5
logging.addLevelName(logging.VERBOSE, "VERBOSE")