Skip to content

Commit

Permalink
Log info for state observer
Browse files Browse the repository at this point in the history
  • Loading branch information
marcin-usielski committed Jul 18, 2024
1 parent ba58b64 commit c72a169
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion moler/device/textualdevice.py
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,10 @@ def _prompts_observer_callback(self, event):
state = occurrence["state"]
line = occurrence["line"]
self._log(level=logging.DEBUG, msg=f"Callback for state {state} for line >>{line}<<")
self._set_state(state)
if self.current_state != state:
self._log(level=logging.INFO,
msg=f"Callback for state {state} for line >>{line}<<")
self._set_state(state)
if self._check_all_prompts_on_line:
if len(occurrence["list_matched"]) > 1:
prompts = [{item["state"]: item["prompt_regex"]} for item in
Expand Down

0 comments on commit c72a169

Please sign in to comment.