mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-08 02:45:48 +08:00
Changes logging function (#6919)
* updated logging methods for stores * updated logging methods for stores * updated logging methods for filer * updated logging methods for uploader and http_util * updated logging methods for weed server --------- Co-authored-by: akosov <a.kosov@kryptonite.ru>
This commit is contained in:
@@ -285,7 +285,7 @@ func ReadUrl(ctx context.Context, fileUrl string, cipherKey []byte, isContentCom
|
||||
// drains the response body to avoid memory leak
|
||||
data, _ := io.ReadAll(reader)
|
||||
if len(data) != 0 {
|
||||
glog.V(1).Infof("%s reader has remaining %d bytes", contentEncoding, len(data))
|
||||
glog.V(1).InfofCtx(ctx, "%s reader has remaining %d bytes", contentEncoding, len(data))
|
||||
}
|
||||
return n, err
|
||||
}
|
||||
@@ -368,7 +368,7 @@ func readEncryptedUrl(ctx context.Context, fileUrl, jwt string, cipherKey []byte
|
||||
if isContentCompressed {
|
||||
decryptedData, err = util.DecompressData(decryptedData)
|
||||
if err != nil {
|
||||
glog.V(0).Infof("unzip decrypt %s: %v", fileUrl, err)
|
||||
glog.V(0).InfofCtx(ctx, "unzip decrypt %s: %v", fileUrl, err)
|
||||
}
|
||||
}
|
||||
if len(decryptedData) < int(offset)+size {
|
||||
@@ -472,13 +472,13 @@ func RetriedFetchChunkData(ctx context.Context, buffer []byte, urlStrings []stri
|
||||
break
|
||||
}
|
||||
if err != nil {
|
||||
glog.V(0).Infof("read %s failed, err: %v", urlString, err)
|
||||
glog.V(0).InfofCtx(ctx, "read %s failed, err: %v", urlString, err)
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
if err != nil && shouldRetry {
|
||||
glog.V(0).Infof("retry reading in %v", waitTime)
|
||||
glog.V(0).InfofCtx(ctx, "retry reading in %v", waitTime)
|
||||
time.Sleep(waitTime)
|
||||
} else {
|
||||
break
|
||||
|
Reference in New Issue
Block a user