edit debug msg

This commit is contained in:
Bastian Schroll 2017-10-03 12:03:08 +02:00
parent 9aa163d5a8
commit b52d972c20
2 changed files with 4 additions and 4 deletions

View file

@ -133,13 +133,13 @@ def decode(freq, decoded):
# multicastAlarm processing if enabled and message without text ord delimiter RIC received
if globalVars.config.getint("multicastAlarm", "multicastAlarm") and (data["msg"] == "" or data["ric"] == globalVars.config.get("multicastAlarm", "multicastAlarm_delimiter_ric")):
logging.debug(" - multicastAlarm or delimiter RIC received - buffer alarms until text received")
logging.debug(" - multicastAlarm without msg")
from includes import multicastAlarm
multicastAlarm.newEntrymultiList("POC", freq, data)
# multicastAlarm processing if enabled and alarm message has been received
elif globalVars.config.getint("multicastAlarm", "multicastAlarm") and data["msg"] != "" and data["ric"] == globalVars.config.get("multicastAlarm", "multicastAlarm_ric"):
logging.debug(" - multicastAlarm RIC with text message")
logging.debug(" - multicastAlarm with message")
from includes import multicastAlarm
multicastAlarm.multicastAlarmExec("POC", freq, data)

View file

@ -28,10 +28,10 @@ def newEntrymultiList(typ, freq, data):
# multicastAlarm processing if enabled and delimiter RIC has been received
if data['ric'] == globalVars.config.get("multicastAlarm", "multicastAlarm_delimiter_ric"):
multiList = []
logging.debug("multicastAlarm delimiter RIC received --> buffer cleared %s ", data)
logging.debug("multicastAlarm delimiter RIC received --> buffer cleared")
else:
multiList.append([typ, data['ric'], data['function'], data['functionChar'], data['msg'].strip(), data['description'], timestamp])
logging.debug("Added %s %s %s %s to multiList", data['ric'], data['function'], data['functionChar'], data['msg'].strip())
logging.debug("Added %s to multiList", data['ric'])
# check for old entries in multiList
for i, _ in enumerate(multiList):
# we have to remove entries older than timestamp - ignore time