From f0f034d7e482eb646ea35656bc5d88a1ad98ac3e Mon Sep 17 00:00:00 2001 From: hubobel Date: Tue, 16 Jun 2026 17:37:44 +0200 Subject: [PATCH] Logging --- categorize_transactions.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/categorize_transactions.py b/categorize_transactions.py index 4f780bd..d0d34d5 100644 --- a/categorize_transactions.py +++ b/categorize_transactions.py @@ -16,7 +16,11 @@ import logging # Logging # -------------------------------------------------- -log_dir = Path.home() / "logs" +if platform.system() == "Windows": + log_dir = Path(__file__).parent / "logs" +else: + log_dir = Path.home() / "logs" + log_dir.mkdir(exist_ok=True) log_file = log_dir / "categorize_transactions.log" @@ -445,4 +449,6 @@ else: logging.warning( "Keine Synchronisationsmethode gefunden." - ) \ No newline at end of file + ) + +logging.info("=== Scriptende ===") \ No newline at end of file