diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2020-05-27 21:32:44 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-27 21:32:44 -0700 |
| commit | ed92992003706834e188a3110f59f8e383468a10 (patch) | |
| tree | 79bd0c30112f568ec847283f37600bb93047cd60 | |
| parent | ef2b3a0801ba1a56f97460a591957942c194942d (diff) | |
| parent | 41cab5d69f237d489e752e58eb7fbec59f2638fb (diff) | |
| download | seaweedfs-ed92992003706834e188a3110f59f8e383468a10.tar.xz seaweedfs-ed92992003706834e188a3110f59f8e383468a10.zip | |
Merge pull request #1331 from bingoohuang/master
log JSON response if httpStatus >= 400
| -rw-r--r-- | weed/server/common.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/weed/server/common.go b/weed/server/common.go index f064ca707..150b9d954 100644 --- a/weed/server/common.go +++ b/weed/server/common.go @@ -46,6 +46,12 @@ func writeJson(w http.ResponseWriter, r *http.Request, httpStatus int, obj inter if err != nil { 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 == "" { w.Header().Set("Content-Type", "application/json") |
