1
0
Fork 0

Fix log formatting for notifications

This commit is contained in:
tituspijean 2024-04-29 21:22:59 +02:00
parent 2ac5fce827
commit f4dd0eff36
3 changed files with 3 additions and 3 deletions

View file

@ -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:

View file

@ -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

View file

@ -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):