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