mirror of
https://github.com/Schrolli91/BOSWatch.git
synced 2026-01-14 04:20:04 +01:00
set Loglevel of fileHandler in config.ini
This commit is contained in:
parent
2ddee40d9d
commit
ac7965137d
13
boswatch.py
13
boswatch.py
|
|
@ -125,11 +125,18 @@ try:
|
|||
globals.config = ConfigParser.ConfigParser()
|
||||
globals.config.read(globals.script_path+"/config/config.ini")
|
||||
for key,val in globals.config.items("BOSWatch"):
|
||||
logging.debug(" - %s = %s", key, val)
|
||||
logging.debug(" - %s = %s", key, val)
|
||||
except:
|
||||
logging.exception("cannot read config file")
|
||||
else:
|
||||
else:
|
||||
|
||||
try:
|
||||
#set the loglevel of the file handler
|
||||
logging.debug("set loglevel of fileHandler")
|
||||
fh.setLevel(globals.config.getint("BOSWatch","loglevel"))
|
||||
except:
|
||||
logging.exception("cannot set loglevel of fileHandler")
|
||||
|
||||
#load plugins
|
||||
from includes import pluginLoader
|
||||
pluginLoader.loadPlugins()
|
||||
|
|
@ -191,4 +198,4 @@ finally:
|
|||
logging.warning("failed in clean-up routine")
|
||||
finally:
|
||||
logging.info("BOSWatch exit()")
|
||||
exit(0)
|
||||
exit(0)
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@
|
|||
########################
|
||||
|
||||
[BOSWatch]
|
||||
#set loglevel for logfile
|
||||
loglevel = 20
|
||||
|
||||
#time to ignore same alarm in a row (sek)
|
||||
fms_double_ignore_time = 5
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue