Fix bug in logging: need Printf as string contains format directives.

This commit is contained in:
Ray Miller 2023-01-19 16:20:22 +00:00
parent 9ec3b2e980
commit 4de001c867

View file

@ -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
}