mirror of
https://github.com/Schrolli91/BOSWatch.git
synced 2026-01-20 23:30:17 +01:00
little debug and error edits
This commit is contained in:
parent
be9aa3b722
commit
0e952d6057
|
|
@ -6,20 +6,23 @@ import logging
|
|||
from includes import globals # Global variables
|
||||
|
||||
def processAlarm(typ,freq,data):
|
||||
logging.debug("[ ALARM ]")
|
||||
for pluginName, plugin in globals.pluginList.items():
|
||||
|
||||
#if enabled use RegEx-Filter
|
||||
if globals.config.getint("BOSWatch","useRegExFilter"):
|
||||
from includes import filter
|
||||
if filter.checkFilters(data,typ,pluginName):
|
||||
try:
|
||||
logging.debug("[ ALARM ]")
|
||||
for pluginName, plugin in globals.pluginList.items():
|
||||
|
||||
#if enabled use RegEx-Filter
|
||||
if globals.config.getint("BOSWatch","useRegExFilter"):
|
||||
from includes import filter
|
||||
if filter.checkFilters(data,typ,pluginName):
|
||||
logging.debug("call Plugin: %s", pluginName)
|
||||
plugin.run(typ,freq,data)
|
||||
logging.debug("return from: %s", pluginName)
|
||||
|
||||
else:
|
||||
logging.debug("call Plugin: %s", pluginName)
|
||||
plugin.run(typ,freq,data)
|
||||
logging.debug("return from: %s", pluginName)
|
||||
|
||||
else:
|
||||
logging.debug("call Plugin: %s", pluginName)
|
||||
plugin.run(typ,freq,data)
|
||||
logging.debug("return from: %s", pluginName)
|
||||
|
||||
logging.debug("[END ALARM]")
|
||||
logging.debug("[END ALARM]")
|
||||
except:
|
||||
logging.exception("Error in Alarm processing")
|
||||
|
|
@ -27,4 +27,4 @@ def decode(freq, decoded):
|
|||
poc.decode(freq, decoded)
|
||||
|
||||
except:
|
||||
logging.exception("cannot start decoder")
|
||||
logging.exception("cannot start decoder")
|
||||
|
|
@ -9,8 +9,8 @@ from includes import globals # Global variables
|
|||
|
||||
|
||||
def loadFilters():
|
||||
logging.debug("loading filters")
|
||||
try:
|
||||
logging.debug("loading filters")
|
||||
for key,val in globals.config.items("Filters"):
|
||||
logging.debug(" - %s = %s", key, val)
|
||||
filter = val.split(";")
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ def getPlugins():
|
|||
plugins = []
|
||||
for i in os.listdir(PluginFolder):
|
||||
location = os.path.join(PluginFolder, i)
|
||||
# plugins have to be a subdir with MainModule, if not skip
|
||||
|
||||
if not os.path.isdir(location) or not i + ".py" in os.listdir(location):
|
||||
continue
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ def getPlugins():
|
|||
logging.debug("Plugin [ENABLED ] %s", i)
|
||||
else:
|
||||
logging.debug("Plugin [DISABLED] %s ", i)
|
||||
except: #no entry for plugin found in config-file, skip
|
||||
except: #no entry for plugin found in config-file
|
||||
logging.warning("Plugin [NO CONF ] %s", i)
|
||||
except:
|
||||
logging.exception("Error during Plugin search")
|
||||
|
|
|
|||
Loading…
Reference in a new issue