1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-07-04 08:06:53 +02:00

more error details in the log (#3568)

* more error details in the log
https://github.com/seaweedfs/seaweedfs/issues/3567

* format message
This commit is contained in:
Konstantin Lebedev 2022-09-01 21:04:15 +05:00 committed by GitHub
parent 10efdc7aab
commit 82c2ce74db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -110,6 +110,7 @@ func writeJsonQuiet(w http.ResponseWriter, r *http.Request, httpStatus int, obj
func writeJsonError(w http.ResponseWriter, r *http.Request, httpStatus int, err error) {
m := make(map[string]interface{})
m["error"] = err.Error()
glog.V(1).Infof("error JSON response status %d: %s", httpStatus, m["error"])
writeJsonQuiet(w, r, httpStatus, m)
}