consistent logging

This commit is contained in:
Jimmy Zelinskie
2014-06-26 17:10:39 -04:00
parent 8775764fb6
commit caba155b5d
5 changed files with 51 additions and 30 deletions
+6 -2
View File
@@ -128,7 +128,11 @@ func fail(err error, w http.ResponseWriter, r *http.Request) {
length, _ := io.WriteString(w, msg)
w.Header().Add("Content-Length", string(length))
log.V(2).Infof("chihaya: handled failure: %s from %s ", errmsg, r.RemoteAddr)
w.(http.Flusher).Flush()
log.V(5).Infof(
"failed request: ip: %s failure: %s",
r.RemoteAddr,
errmsg,
)
}