From 497f6a0a1a206419bdec19e3fe218541aed1e8b7 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Thu, 7 Mar 2024 01:32:27 -0500 Subject: [PATCH] fix(repo): changed all loggers to `red.seacogs.` instead of `red.sea.` --- aurora/utilities/logger.py | 2 +- backup/backup.py | 2 +- bible/bible.py | 2 +- pterodactyl/logger.py | 3 ++- pterodactyl/websocket.py | 5 ++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/aurora/utilities/logger.py b/aurora/utilities/logger.py index 84a7836..748b8e4 100644 --- a/aurora/utilities/logger.py +++ b/aurora/utilities/logger.py @@ -1,3 +1,3 @@ import logging -logger = logging.getLogger("red.sea.aurora") +logger = logging.getLogger("red.seacogs.aurora") diff --git a/backup/backup.py b/backup/backup.py index 4977c97..4577dd0 100644 --- a/backup/backup.py +++ b/backup/backup.py @@ -27,7 +27,7 @@ class Backup(commands.Cog): def __init__(self, bot: Red): super().__init__() self.bot = bot - self.logger = logging.getLogger("red.sea.backup") + self.logger = logging.getLogger("red.seacogs.backup") @commands.group(autohelp=True) @commands.is_owner() diff --git a/bible/bible.py b/bible/bible.py index dc809ca..963648c 100644 --- a/bible/bible.py +++ b/bible/bible.py @@ -31,7 +31,7 @@ class Bible(commands.Cog): self.config = Config.get_conf( self, identifier=481923957134912, force_registration=True ) - self.logger = logging.getLogger("red.sea.bible") + self.logger = logging.getLogger("red.seacogs.bible") self.config.register_global(bible="de4e12af7f28f599-02") self.config.register_user(bible=None) diff --git a/pterodactyl/logger.py b/pterodactyl/logger.py index a1781ab..4ccbf1e 100644 --- a/pterodactyl/logger.py +++ b/pterodactyl/logger.py @@ -1,3 +1,4 @@ import logging -logger = logging.getLogger('red.sea.pterodactyl') +logger = logging.getLogger('red.seacogs.pterodactyl') +websocket_logger = logging.getLogger('red.seacogs.pterodactyl.websocket') diff --git a/pterodactyl/websocket.py b/pterodactyl/websocket.py index 5d1aeab..1c72880 100644 --- a/pterodactyl/websocket.py +++ b/pterodactyl/websocket.py @@ -1,7 +1,6 @@ # pylint: disable=cyclic-import import json import re -from logging import getLogger from typing import Optional, Union import aiohttp @@ -11,7 +10,7 @@ from pydactyl import PterodactylClient from redbot.core.utils.chat_formatting import bold, pagify from pterodactyl.config import config -from pterodactyl.logger import logger +from pterodactyl.logger import logger, websocket_logger from pterodactyl.pterodactyl import Pterodactyl @@ -23,7 +22,7 @@ async def establish_websocket_connection(coginstance: Pterodactyl) -> None: websocket_credentials = await retrieve_websocket_credentials(coginstance) - async with websockets.connect(websocket_credentials['data']['socket'], origin=base_url, ping_timeout=60, logger=getLogger("red.sea.pterodactyl.websocket")) as websocket: + async with websockets.connect(websocket_credentials['data']['socket'], origin=base_url, ping_timeout=60, logger=websocket_logger) as websocket: logger.info("WebSocket connection established") auth_message = json.dumps({"event": "auth", "args": [websocket_credentials['data']['token']]})