From 4de001c8677c61df38bfa0a8e0ec57ffd31e1a68 Mon Sep 17 00:00:00 2001 From: Ray Miller Date: Thu, 19 Jan 2023 16:20:22 +0000 Subject: [PATCH] Fix bug in logging: need Printf as string contains format directives. --- pkg/rwgps/handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/rwgps/handler.go b/pkg/rwgps/handler.go index f2fe661..4ac61d4 100644 --- a/pkg/rwgps/handler.go +++ b/pkg/rwgps/handler.go @@ -41,7 +41,7 @@ func (h *RWGPSHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { } routeId, err := strconv.Atoi(rawRouteId) if err != nil { - log.Println("Error parsing route id '%s': %v", rawRouteId, err) + log.Printf("Error parsing route id '%s': %v", rawRouteId, err) http.Error(w, fmt.Sprintf("Invalid routeId: %s", rawRouteId), http.StatusBadRequest) return }