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/map.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'go/game/map.go') diff --git a/go/game/map.go b/go/game/map.go index 48ec8be3..f2cf1c53 100644 --- a/go/game/map.go +++ b/go/game/map.go @@ -3,7 +3,6 @@ package game import ( "fmt" "io" - "log" "math/rand" "net/http" "os" @@ -15,6 +14,7 @@ import ( "gopkg.in/yaml.v3" "muhq.space/muhqs-game/go/assets" + "muhq.space/muhqs-game/go/log" ) const ( @@ -195,7 +195,7 @@ func (m *Map) FindFortificationConnections(x int, y int) (connections int, left, // GetMap creates a new map from the definition retrieved for the map's name. func GetMap(name string) (*Map, error) { url := path.Join(assets.BASE_URL, MAP_URL_PART, name+".yml") - log.Printf("loading map from %s\n", url) + log.Info("loading map", "url", url) resp, err := http.Get(assets.PROTOCOL + url) if err != nil { log.Fatal(err) -- cgit v1.2.3