add logging
This commit is contained in:
parent
36f18d6e31
commit
7690d725fb
@ -5,6 +5,7 @@ package machine
|
||||
import (
|
||||
_ "errors"
|
||||
"fmt"
|
||||
"log/slog"
|
||||
)
|
||||
|
||||
type Transitioner interface {
|
||||
@ -24,6 +25,7 @@ func NewTransition(trigger string, source State, dest State) Transitioner {
|
||||
}
|
||||
|
||||
func (r *Transition) Run(m Modeler) error {
|
||||
slog.Info("Transition.Run()", "transition", r, "model" m)
|
||||
currentState := m.InspectState()
|
||||
if currentState == r.dest {
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user