Skip to content

Commit

Permalink
stateengine plugin: improve log entries for elog (update of manuell i…
Browse files Browse the repository at this point in the history
…tem)
  • Loading branch information
onkelandy committed Sep 10, 2023
1 parent 3e92e4f commit e8ac378
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions stateengine/StateEngineFunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def manual_item_update_eval(self, item_id, caller=None, source=None):
else:
elog = StateEngineLogger.SeLoggerDummy()
elog.header("manual_item_update_eval")
elog.info("running for item '{0}' source '{1}' caller '{2}'", item_id, caller, source)
elog.info("running for item '{0}' source '{1}' caller '{2}'", item_id, source, caller)

retval_no_trigger = item()
retval_trigger = not item()
Expand Down Expand Up @@ -121,7 +121,9 @@ def manual_item_update_eval(self, item_id, caller=None, source=None):
result = entry.match(original)
elog.info("Checking regex result {}", result)
if result is not None:
elog.info("{0}: matching. Writing value {1}", entry, retval_no_trigger)
elog.info("{0}: matching.", entry)
elog.decrease_indent()
elog.info("Writing value {0}", retval_no_trigger)
return retval_no_trigger
elog.info("{0}: not matching", entry)
elog.decrease_indent()
Expand All @@ -144,7 +146,9 @@ def manual_item_update_eval(self, item_id, caller=None, source=None):
result = entry.match(original)
elog.info("Checking regex result {}", result)
if result is not None:
elog.info("{0}: matching. Writing value {1}", entry, retval_no_trigger)
elog.info("{0}: matching.", entry)
elog.decrease_indent()
elog.info("Writing value {0}", retval_no_trigger)
return retval_no_trigger
elog.info("{0}: not matching", entry)
elog.decrease_indent()
Expand All @@ -166,7 +170,9 @@ def manual_item_update_eval(self, item_id, caller=None, source=None):
result = entry.match(original)
elog.info("Checking regex result {}", result)
if result is not None:
elog.info("{0}: matching. Writing value {1}", entry, retval_trigger)
elog.info("{0}: matching.", entry)
elog.decrease_indent()
elog.info("Writing value {0}", retval_no_trigger)
return retval_trigger
elog.info("{0}: not matching", entry)
elog.decrease_indent()
Expand Down

0 comments on commit e8ac378

Please sign in to comment.