logs on linux in /var/log/boswatch/

on windows in log/ folder
This commit is contained in:
Bastian Schroll 2018-09-17 20:15:30 +02:00
parent 3564680867
commit 16a8424b80

View file

@ -17,12 +17,18 @@
import logging
import os
import sys
import platform
logging.debug("- %s loaded", __name__)
# todo searching for root part is not a nice solution atm
ROOT_PATH = os.path.dirname(sys.modules['boswatch'].__file__).replace("\\", "/") + "/../"
LOG_PATH = ROOT_PATH + "log/"
if platform.system() is "Linux":
LOG_PATH = "/var/log/boswatch/"
else:
LOG_PATH = ROOT_PATH + "log/"
CONFIG_PATH = ROOT_PATH + "config/"
PLUGIN_PATH = ROOT_PATH + "plugins/"
CSV_PATH = ROOT_PATH + "csv/"