mirror of
https://github.com/TheNetworkGuy/netbox-zabbix-sync.git
synced 2025-07-13 07:24:47 -06:00
Fixed bug where sync.log was created in the modules directory
This commit is contained in:
parent
76723d2823
commit
8ce2cab86f
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user