fix(pterodactyl): update PterodactylClient initialization to use my own logger instead of setting debug to true
Some checks failed
Actions / Lint Code (Ruff & Pylint) (push) Failing after 20s
Actions / Build Documentation (MkDocs) (push) Successful in 25s

This commit is contained in:
Seaswimmer 2024-03-07 02:33:14 -05:00
parent 2e5fa81eac
commit b5362ff153
Signed by: cswimr
GPG key ID: B8953EC01E5C4063

View file

@ -134,10 +134,7 @@ async def retrieve_websocket_credentials(coginstance: Pterodactyl) -> Optional[d
coginstance.task.cancel() coginstance.task.cancel()
raise ValueError("Pterodactyl server ID not set. Please set it using `[p]pterodactyl config serverid`.") raise ValueError("Pterodactyl server ID not set. Please set it using `[p]pterodactyl config serverid`.")
#FIXME - pydactyl should not be overriding the global python logger, but until that issue is fixed, client = PterodactylClient(base_url, api_key, logger=logger).client
# we need to set the pydactyl logger to debug so it doesn't ignore any non-error log
# relevant issue - https://github.com/iamkubi/pydactyl/issues/82
client = PterodactylClient(base_url, api_key, debug=True).client
coginstance.client = client coginstance.client = client
websocket_credentials = client.servers.get_websocket(server_id) websocket_credentials = client.servers.get_websocket(server_id)
logger.debug("""Websocket connection details retrieved: logger.debug("""Websocket connection details retrieved: