From e12ded9d428d81bae2a531e09e901a5bd097d67f Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Thu, 29 Feb 2024 16:58:19 -0500 Subject: [PATCH] fix(pterodactyl): add more verbose debug logging --- pterodactyl/pterodactyl.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pterodactyl/pterodactyl.py b/pterodactyl/pterodactyl.py index 8982f48..e3892c9 100644 --- a/pterodactyl/pterodactyl.py +++ b/pterodactyl/pterodactyl.py @@ -115,8 +115,9 @@ class Pterodactyl(commands.Cog): regex = await self.config.chat_regex() match: Optional[re.Match[str]] = re.match(regex, text) if match: - self.logger.debug("Message is a chat message") - return {"time": match.group(1), "username": match.group(2), "message": match.group(3)} + dict = {"time": match.group(1), "username": match.group(2), "message": match.group(3)} + self.logger.debug("Message is a chat message\n%s", json.dumps(dict)) + return dict self.logger.debug("Message is not a chat message") return False @@ -126,7 +127,7 @@ class Pterodactyl(commands.Cog): async with aiohttp.ClientSession() as session: async with session.get(f"https://playerdb.co/api/player/{endpoint}/{username}") as response: if response.status == 200: - self.logger.debug("Player info retrieved for %s", username) + self.logger.debug("Player info retrieved for %s\n%s", username, json.dumps(await response.json())) return await response.json() else: self.logger.error("Failed to retrieve player info for %s: %s", username, response.status)