diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-11-16 22:26:58 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-11-16 22:26:58 -0800 |
| commit | 6c9156b25f8b1c28fb0cc909310a20aeeec0e087 (patch) | |
| tree | 343e30d98e46a081aa57adfc334b807d0b3255dc /weed/replication/sink/filersink/fetch_write.go | |
| parent | 9add554feb53706d1d878cc9636d234e622b8a80 (diff) | |
| download | seaweedfs-origin/logrus.tar.xz seaweedfs-origin/logrus.zip | |
switch to logrusorigin/logrus
losing filename and line number. Critical for debugging.
Diffstat (limited to 'weed/replication/sink/filersink/fetch_write.go')
| -rw-r--r-- | weed/replication/sink/filersink/fetch_write.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/weed/replication/sink/filersink/fetch_write.go b/weed/replication/sink/filersink/fetch_write.go index d193ff81c..f26b4876c 100644 --- a/weed/replication/sink/filersink/fetch_write.go +++ b/weed/replication/sink/filersink/fetch_write.go @@ -8,7 +8,7 @@ import ( "google.golang.org/grpc" - "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/util/log" "github.com/chrislusf/seaweedfs/weed/operation" "github.com/chrislusf/seaweedfs/weed/pb" "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" @@ -82,7 +82,7 @@ func (fs *FilerSink) fetchAndWrite(sourceChunk *filer_pb.FileChunk, path string) resp, err := client.AssignVolume(context.Background(), request) if err != nil { - glog.V(0).Infof("assign volume failure %v: %v", request, err) + log.Infof("assign volume failure %v: %v", request, err) return err } if resp.Error != "" { @@ -98,16 +98,16 @@ func (fs *FilerSink) fetchAndWrite(sourceChunk *filer_pb.FileChunk, path string) fileUrl := fmt.Sprintf("http://%s/%s", host, fileId) - glog.V(4).Infof("replicating %s to %s header:%+v", filename, fileUrl, header) + log.Tracef("replicating %s to %s header:%+v", filename, fileUrl, header) // fetch data as is, regardless whether it is encrypted or not uploadResult, err, _ := operation.Upload(fileUrl, filename, false, resp.Body, "gzip" == header.Get("Content-Encoding"), header.Get("Content-Type"), nil, auth) if err != nil { - glog.V(0).Infof("upload source data %v to %s: %v", sourceChunk.GetFileIdString(), fileUrl, err) + log.Infof("upload source data %v to %s: %v", sourceChunk.GetFileIdString(), fileUrl, err) return "", fmt.Errorf("upload data: %v", err) } if uploadResult.Error != "" { - glog.V(0).Infof("upload failure %v to %s: %v", filename, fileUrl, err) + log.Infof("upload failure %v to %s: %v", filename, fileUrl, err) return "", fmt.Errorf("upload result: %v", uploadResult.Error) } |
