Skip to content

Commit

Permalink
api: fix 404 error logging
Browse files Browse the repository at this point in the history
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".
  • Loading branch information
kevinburke committed Apr 3, 2017
1 parent 59ee75c commit 6a50bbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 6a50bbb

Please sign in to comment.