feat(sync-utils): add logging delegation method to BaseSyncUtils

This commit is contained in:
bsiggel
2026-03-08 18:38:48 +00:00
parent 91ae2947e5
commit 7fd6eed86d
2 changed files with 663 additions and 187 deletions

View File

@@ -42,6 +42,11 @@ class BaseSyncUtils:
"Distributed Locking deaktiviert - Race Conditions möglich!"
)
def _log(self, message: str, level: str = 'info') -> None:
"""Delegate logging to the logger with optional level"""
log_func = getattr(self.logger, level, self.logger.info)
log_func(message)
def _get_lock_key(self, entity_id: str) -> str:
"""
Erzeugt Redis Lock-Key für eine Entity