diff options
| author | Jeroen Wijenbergh <jeroenwijenbergh@protonmail.com> | 2022-04-25 18:09:21 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-04-25 18:09:21 +0200 |
| commit | 9bb5a09ec2b4620652efc306e68442c05d434364 (patch) | |
| tree | 3233fc7fe0ce9bc23fd46ab7ddef93e1e33407ec | |
| parent | 0120ed603bf3c8db8dbcf1e08e5d99e6488fd953 (diff) | |
FSM: Log state transitions
| -rw-r--r-- | internal/fsm.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/fsm.go b/internal/fsm.go index d0925c5..4d2b266 100644 --- a/internal/fsm.go +++ b/internal/fsm.go @@ -151,6 +151,9 @@ func (fsm *FSM) GoTransitionWithData(newState FSMStateID, data string, backgroun if fsm.Debug { fsm.writeGraph() } + + fsm.Logger.Log(LOG_INFO, fmt.Sprintf("State: %s -> State: %s with data %s\n", oldState.String(), newState.String(), data)) + if background { go fsm.StateCallback(oldState.String(), newState.String(), data) } else { |
