feat: enhance logging by redacting sensitive information and update .gitignore for runtime logs
This commit is contained in:
@@ -79,9 +79,7 @@ class PlexClient:
|
||||
# Update the base URL and connection status
|
||||
self.base_url = build_plex_url(scheme, url, port)
|
||||
self.connected = True
|
||||
logger.info(
|
||||
f"Connected to Plex server at {self.base_url} with token: {self.token}"
|
||||
)
|
||||
logger.info(f"Connected to Plex server at {self.base_url}.")
|
||||
return self.server, self.token
|
||||
except Exception as e:
|
||||
logger.warning(f"Failed to connect to Plex server: {str(e)}")
|
||||
@@ -106,9 +104,7 @@ class PlexClient:
|
||||
self.token = account.authenticationToken
|
||||
|
||||
self.server = PlexServer(self.base_url, self.token, timeout=timeout)
|
||||
logger.debug(
|
||||
f"Connected to Plex server with username: {username}, token: {self.token}"
|
||||
)
|
||||
logger.debug(f"Connected to Plex server with username: {username}.")
|
||||
return self.server, self.token
|
||||
|
||||
def _connect_with_token(
|
||||
@@ -124,7 +120,7 @@ class PlexClient:
|
||||
self.base_url = build_plex_url(scheme, url, port)
|
||||
|
||||
self.server = PlexServer(self.base_url, token, timeout=timeout)
|
||||
logger.debug(f"Connected to Plex server with token: {token}")
|
||||
logger.debug("Connected to Plex server with token.")
|
||||
return self.server, token
|
||||
|
||||
def _connect_check(self):
|
||||
|
||||
Reference in New Issue
Block a user