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",