feat(repo): added help formatters for version numbers to cogs that have them and migrated to using red's inbuilt loggers instead of logging.getLogger

This commit is contained in:
SeaswimmerTheFsh 2024-03-07 03:38:34 -05:00
parent ae31a61436
commit 178a92559c
Signed by untrusted user: cswimr
GPG key ID: B8953EC01E5C4063
6 changed files with 62 additions and 30 deletions

View file

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