From 6a50bbb8b89cb78e38a9cb13b3cfc3fff277739c Mon Sep 17 00:00:00 2001 From: Kevin Burke Date: Mon, 3 Apr 2017 16:08:18 -0700 Subject: [PATCH] api: fix 404 error logging The first value is an integer and the second value is a string and the format string has these backwards, leading to %!s(int=404) appearing in the logs instead of "404". --- api/router.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/router.go b/api/router.go index 76d9b827..74658814 100644 --- a/api/router.go +++ b/api/router.go @@ -52,7 +52,7 @@ func (rtr router) ServeHTTP(w http.ResponseWriter, r *http.Request) { return } - log.Infof("%s %d %s %s", http.StatusNotFound, r.Method, r.RequestURI, r.RemoteAddr) + log.Infof("%d %s %s %s", http.StatusNotFound, r.Method, r.RequestURI, r.RemoteAddr) http.NotFound(w, r) }