From 1b7bf1f8bb14fd8a26a0ce36c5d55c7a0072ba89 Mon Sep 17 00:00:00 2001 From: bensteUEM Date: Mon, 7 Oct 2024 22:19:56 +0200 Subject: [PATCH] fixed previously broken and optimized logger entry --- churchtools_api/events.py | 4 ++-- churchtools_api/files.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/churchtools_api/events.py b/churchtools_api/events.py index 231cb5a..35ab7b7 100644 --- a/churchtools_api/events.py +++ b/churchtools_api/events.py @@ -162,7 +162,7 @@ def get_AllEventData_ajax(self, eventId) -> dict: response_content = json.loads(response.content) if len(response_content["data"]) > 0: response_data = response_content["data"][str(eventId)] - logger.debug(f"AJAX Event data {response_data}") + logger.debug(f"AJAX Event data len= {len(response_data)}") return response_data logger.info( f"AJAX All Event data not successful - no event found: {response.status_code}", @@ -340,7 +340,7 @@ def get_event_agenda(self, eventId: int) -> list: if response.status_code == 200: response_content = json.loads(response.content) response_data = response_content["data"].copy() - logger.debug(f"Agenda load successful {response_content}") + logger.debug(f"Agenda load successful {len(response_content)} items") return response_data logger.info( diff --git a/churchtools_api/files.py b/churchtools_api/files.py index 7053033..36891d6 100644 --- a/churchtools_api/files.py +++ b/churchtools_api/files.py @@ -157,7 +157,7 @@ def file_download( # If folder doesn't exist, then create it. if not CHECK_FOLDER: os.makedirs(target_path) - logger("created folder : %s", target_path) + logger.info("created folder : %s", target_path) url = f"{self.domain}/api/files/{domain_type}/{domain_identifier}" response = self.session.get(url=url)