Browse Source

only log response JSON when httpStatus >= 400

pull/1330/head
bingoo 6 years ago
parent
commit
de1428e8ca
  1. 2
      weed/server/common.go
  2. 2
      weed/server/volume_server_handlers.go

2
weed/server/common.go

@ -47,8 +47,10 @@ func writeJson(w http.ResponseWriter, r *http.Request, httpStatus int, obj inter
return
}
if httpStatus >= 400 {
glog.V(0).Infof("response method:%s URL:%s with httpStatus:%d and JSON:%s",
r.Method, r.URL.String(), httpStatus, string(bytes))
}
callback := r.FormValue("callback")
if callback == "" {

2
weed/server/volume_server_handlers.go

@ -25,8 +25,6 @@ security settings:
*/
func (vs *VolumeServer) privateStoreHandler(w http.ResponseWriter, r *http.Request) {
glog.V(0).Infof("request method:%s URL:%s", r.Method, r.URL.String())
switch r.Method {
case "GET", "HEAD":
stats.ReadRequest()

Loading…
Cancel
Save