aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-07-14 11:27:00 -0700
committerChris Lu <chris.lu@gmail.com>2020-07-14 11:27:00 -0700
commitbbc8ae110fbd592f68bbee6f26c9ce66709a207d (patch)
tree90754e11aa534fa4eacb0b44ffc44b9f5e16646e
parent17f2d05cded9dee2cece0a4e9c5e49d9ad02e845 (diff)
downloadseaweedfs-bbc8ae110fbd592f68bbee6f26c9ce66709a207d.tar.xz
seaweedfs-bbc8ae110fbd592f68bbee6f26c9ce66709a207d.zip
report errors
-rw-r--r--weed/operation/upload_content.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/weed/operation/upload_content.go b/weed/operation/upload_content.go
index 658588ec3..cb129daa2 100644
--- a/weed/operation/upload_content.go
+++ b/weed/operation/upload_content.go
@@ -205,8 +205,8 @@ func upload_content(uploadUrl string, fillBufferFunction func(w io.Writer) error
req, postErr := http.NewRequest("POST", uploadUrl, body_buf)
if postErr != nil {
- glog.V(0).Infoln("failing to upload to", uploadUrl, postErr.Error())
- return nil, postErr
+ glog.V(1).Infof("failing to upload to %s: %v", uploadUrl, postErr)
+ return nil, fmt.Errorf("failing to upload to %s: %v", uploadUrl, postErr)
}
req.Header.Set("Content-Type", content_type)
for k, v := range pairMap {
@@ -217,8 +217,8 @@ func upload_content(uploadUrl string, fillBufferFunction func(w io.Writer) error
}
resp, post_err := HttpClient.Do(req)
if post_err != nil {
- glog.V(0).Infoln("failing to upload to", uploadUrl, post_err.Error())
- return nil, post_err
+ glog.V(1).Infof("failing to upload to %v: %v", uploadUrl, post_err)
+ return nil, fmt.Errorf("failing to upload to %v: %v", uploadUrl, post_err)
}
defer resp.Body.Close()