From f4dd0eff364adaa73d6ce9ecc6d7ba2e18f72ccd Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 29 Apr 2024 21:22:59 +0200 Subject: [PATCH] Fix log formatting for notifications --- app_caches.py | 2 +- appslib/logging_sender.py | 2 +- list_builder.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app_caches.py b/app_caches.py index 9729dd5..069f5f2 100755 --- a/app_caches.py +++ b/app_caches.py @@ -77,7 +77,7 @@ def __app_cache_clone_or_update_mapped(data): try: app_cache_clone_or_update(name, info) except Exception as err: - logging.error("Error while updating %s: %s", name, err) + logging.error("[App caches] Error while updating %s: %s", name, err) def apps_cache_update_all(apps: dict[str, dict[str, Any]], parallel: int = 8) -> None: diff --git a/appslib/logging_sender.py b/appslib/logging_sender.py index a257668..937e328 100644 --- a/appslib/logging_sender.py +++ b/appslib/logging_sender.py @@ -52,7 +52,7 @@ class LogSenderHandler(logging.Handler): self.is_logging = False def emit(self, record: logging.LogRecord) -> None: - msg = f"[Apps tools error] {record.msg}" + msg = f"[Apps tools error] {record.message}" notify(msg, "dev") @classmethod diff --git a/list_builder.py b/list_builder.py index bad1d32..16fe735 100755 --- a/list_builder.py +++ b/list_builder.py @@ -65,7 +65,7 @@ def __build_app_dict(data) -> Optional[tuple[str, dict[str, Any]]]: try: return name, build_app_dict(name, info) except Exception as err: - logging.error("Error while updating %s: %s", name, err) + logging.error("[List builder] Error while updating %s: %s)", name, err) def build_base_catalog(nproc: int):