improved logging

This commit is contained in:
2025-11-20 23:16:16 +01:00
parent 0e47fb6983
commit 239373d5a3
3 changed files with 58 additions and 44 deletions

View File

@@ -4,7 +4,7 @@ import (
"encoding/json"
"fmt"
"io"
"log"
"log/slog"
"net/http"
)
@@ -24,7 +24,7 @@ func getGameName(appID string, cache map[string]string) string {
name, err := fetchGameName(appID)
if err != nil {
log.Printf("failed to fetch name for AppID: %s. Setting to Unknown", appID)
slog.Warn("Failed to fetch name for AppID. Setting to Unknown", "appid", appID)
cache[appID] = UNKOWN_GAME_GAME
return UNKOWN_GAME_GAME
}