mirror of
https://github.com/sot-tech/mochi.git
synced 2026-07-01 22:38:59 -07:00
consistent logging
This commit is contained in:
+6
-2
@@ -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,
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user