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 GitHub
parent c19389f236
commit c4f015a2fb
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: