From 9463ec4cb063f0bde03d0e1b2a650f5887ad29ff Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Sun, 17 Aug 2025 15:16:01 +0200 Subject: use slog and add game log handler callback --- go/game/state.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'go/game/state.go') diff --git a/go/game/state.go b/go/game/state.go index ad3ea815..0d8066c0 100644 --- a/go/game/state.go +++ b/go/game/state.go @@ -3,13 +3,14 @@ package game import ( "errors" "fmt" - "log" "math/rand" "strconv" "strings" "time" "golang.org/x/exp/slices" + + "muhq.space/muhqs-game/go/log" ) type State interface { @@ -539,7 +540,7 @@ func (s *LocalState) allPassing(skipFirst bool) (bool, []*Player) { switch a := _a.(type) { case *PassPriority: - log.Printf("%s passed %d/%d\n", p.Name, i+1, nPlayers) + log.Info("priority passed\n", "player", p.Name, "passed", fmt.Sprintf("%d/%d", i+1, nPlayers)) case nil: log.Fatal("received nil action from ", p.Name, " at ", s.activePhase) default: -- cgit v1.2.3