From 8ce2cab86fad994b687a551b7407263f19d0cdcb Mon Sep 17 00:00:00 2001 From: TheNetworkGuy Date: Thu, 12 Jun 2025 18:35:56 +0000 Subject: [PATCH] Fixed bug where sync.log was created in the modules directory --- modules/logging.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/logging.py b/modules/logging.py index c36c2c1..e96e6e9 100644 --- a/modules/logging.py +++ b/modules/logging.py @@ -21,9 +21,10 @@ def setup_logger(): """ # Set logging lgout = logging.StreamHandler() - lgfile = logging.FileHandler( - path.join(path.dirname(path.realpath(__file__)), "sync.log") - ) + # Logfile in the project root + project_root = path.dirname(path.dirname(path.realpath(__file__))) + logfile_path = path.join(project_root, "sync.log") + lgfile = logging.FileHandler(logfile_path) logging.basicConfig( format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",