summaryrefslogtreecommitdiff
path: root/client/fsm.go
diff options
context:
space:
mode:
authorJeroen Wijenbergh <jeroen.wijenbergh@geant.org>2025-09-02 15:14:02 +0200
committerJeroen Wijenbergh <jeroen.wijenbergh@geant.org>2025-09-02 15:14:02 +0200
commit5e05784cab953b0e24609398106dd33da7738d21 (patch)
treead6f1a8eaa16a5dc38d7849941abe6537d48d00b /client/fsm.go
parent53b40a5353df751d10c8480749b2c1929895c3e6 (diff)
client: Log more in debug and increase rotation to 10MB
Diffstat (limited to 'client/fsm.go')
-rw-r--r--client/fsm.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/client/fsm.go b/client/fsm.go
index 673f3fb..e3a8cc0 100644
--- a/client/fsm.go
+++ b/client/fsm.go
@@ -170,7 +170,14 @@ func newFSM(
},
}
- return fsm.NewFSM(StateMain, states, callback, GetStateName)
+ cbLogged := func(oldState FSMStateID, newState FSMStateID, data any) bool {
+ if oldState != newState {
+ slog.Debug("FSM transition", "old", GetStateName(oldState), "new", GetStateName(newState))
+ }
+ return callback(oldState, newState, data)
+ }
+
+ return fsm.NewFSM(StateMain, states, cbLogged, GetStateName)
}
// SetState sets the state for the client FSM to `state`