fix(pterodactyl): changed a bunch of logger messages to be info and not debug
Some checks failed
Actions / Lint Code (Ruff & Pylint) (pull_request) Failing after 20s
Actions / Build Documentation (MkDocs) (pull_request) Successful in 27s

This commit is contained in:
Seaswimmer 2024-03-01 13:16:22 -05:00
parent 1bbabd495f
commit 837bf4aa34
Signed by: cswimr
GPG key ID: B8953EC01E5C4063

View file

@ -17,7 +17,7 @@ from pterodactyl.pterodactyl import Pterodactyl
async def establish_websocket_connection(coginstance: Pterodactyl) -> None: async def establish_websocket_connection(coginstance: Pterodactyl) -> None:
base_url = await config.base_url() base_url = await config.base_url()
logger.debug("Establishing WebSocket connection") logger.info("Establishing WebSocket connection")
websocket_credentials = await retrieve_websocket_credentials(coginstance) websocket_credentials = await retrieve_websocket_credentials(coginstance)
@ -26,18 +26,18 @@ async def establish_websocket_connection(coginstance: Pterodactyl) -> None:
auth_message = json.dumps({"event": "auth", "args": [websocket_credentials['data']['token']]}) auth_message = json.dumps({"event": "auth", "args": [websocket_credentials['data']['token']]})
await websocket.send(auth_message) await websocket.send(auth_message)
logger.debug("Authentication message sent") logger.info("Authentication message sent")
coginstance.websocket = websocket coginstance.websocket = websocket
while True: # pylint: disable=too-many-nested-blocks while True: # pylint: disable=too-many-nested-blocks
message = await websocket.recv() message = await websocket.recv()
if json.loads(message)['event'] in ('token expiring', 'token expired'): if json.loads(message)['event'] in ('token expiring', 'token expired'):
logger.debug("Received token expiring/expired event. Refreshing token.") logger.info("Received token expiring/expired event. Refreshing token.")
websocket_credentials = await retrieve_websocket_credentials(coginstance) websocket_credentials = await retrieve_websocket_credentials(coginstance)
auth_message = json.dumps({"event": "auth", "args": [websocket_credentials['data']['token']]}) auth_message = json.dumps({"event": "auth", "args": [websocket_credentials['data']['token']]})
await websocket.send(auth_message) await websocket.send(auth_message)
logger.debug("Authentication message sent") logger.info("Authentication message sent")
if json.loads(message)['event'] == 'auth success': if json.loads(message)['event'] == 'auth success':
logger.info("WebSocket authentication successful") logger.info("WebSocket authentication successful")