Redact sensitive info from debug logs (#1069)

Redacts sensitive data when debug logging device responses such as mac,
location and usernames
This commit is contained in:
Steven B
2024-07-17 18:57:09 +01:00
committed by sdb9696
parent a97d2c92bb
commit c4a9a19d5b
11 changed files with 300 additions and 39 deletions

View File

@@ -193,11 +193,9 @@ class SmartDevice(Device):
if not self._features:
await self._initialize_features()
_LOGGER.debug(
"Update completed %s: %s",
self.host,
self._last_update if first_update else resp,
)
if _LOGGER.isEnabledFor(logging.DEBUG):
updated = self._last_update if first_update else resp
_LOGGER.debug("Update completed %s: %s", self.host, list(updated.keys()))
def _handle_module_post_update_hook(self, module: SmartModule) -> bool:
try: