mirror of
https://github.com/TheNetworkGuy/netbox-zabbix-sync.git
synced 2025-07-13 15:24:48 -06:00
Added path config to log filehandler.
This commit is contained in:
parent
6d9698c40c
commit
bff611ca67
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python3
|
||||
"""Netbox to Zabbix sync script."""
|
||||
|
||||
from os import environ
|
||||
from os import environ, path
|
||||
import logging
|
||||
import argparse
|
||||
from pynetbox import api
|
||||
@ -14,7 +14,7 @@ lgout = logging.StreamHandler()
|
||||
lgout.setFormatter(log_format)
|
||||
lgout.setLevel(logging.DEBUG)
|
||||
|
||||
lgfile = logging.FileHandler("sync.log")
|
||||
lgfile = logging.FileHandler(path.join(path.dirname(path.realpath(__file__)), "sync.log"))
|
||||
lgfile.setFormatter(log_format)
|
||||
lgfile.setLevel(logging.DEBUG)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user