Fixed bug where sync.log was created in the modules directory

This commit is contained in:
TheNetworkGuy 2025-06-12 18:35:56 +00:00
parent 76723d2823
commit 8ce2cab86f

View File

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