feat: enhance logging by redacting sensitive information and update .gitignore for runtime logs

This commit is contained in:
2025-12-19 03:23:38 +09:00
parent a0631c6280
commit 254c391c89
4 changed files with 32 additions and 40 deletions
+3 -7
View File
@@ -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):