Skip to content

Commit

Permalink
feat: add debug logging when saving device changes (#59)
Browse files Browse the repository at this point in the history
* feat: add debug logging when saving device changes

related issue #57

* feat: add debug logging when saving device changes

related issue #57
  • Loading branch information
bdraco authored Jun 14, 2024
1 parent 5e3fac8 commit 1c57d00
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/uiprotect/data/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,14 @@ async def _save_device_changes(
revert_on_fail: bool = True,
) -> None:
"""Saves the current device changes to UFP."""
_LOGGER.debug(
"Saving device changes for %s (%s) data_before_changes=%s updated=%s",
self.id,
self.model,
data_before_changes,
updated,
)

assert (
self._update_lock.locked()
), "save_device_changes should only be called when the update lock is held"
Expand Down

0 comments on commit 1c57d00

Please sign in to comment.