little debug and error edits

This commit is contained in:
Schrolli 2015-05-26 11:41:05 +02:00
parent be9aa3b722
commit 0e952d6057
4 changed files with 20 additions and 17 deletions

View file

@ -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")

View file

@ -27,4 +27,4 @@ def decode(freq, decoded):
poc.decode(freq, decoded)
except:
logging.exception("cannot start decoder")
logging.exception("cannot start decoder")

View file

@ -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(";")

View file

@ -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")