forked from cswimr/SeaCogs
fix(pterodactyl): add more verbose debug logging
This commit is contained in:
parent
ee6e900e7d
commit
e12ded9d42
1 changed files with 4 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue