From 208849702d7e6e86e4538468e5d96e8665a4df0c Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Tue, 18 Aug 2020 12:52:54 -0700 Subject: [PATCH] logs --- weed/filesys/filehandle.go | 4 ++-- weed/pb/filer_pb/filer_pb_helper.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/weed/filesys/filehandle.go b/weed/filesys/filehandle.go index efbdc6f34..1cbe120ac 100644 --- a/weed/filesys/filehandle.go +++ b/weed/filesys/filehandle.go @@ -54,7 +54,7 @@ var _ = fs.HandleReleaser(&FileHandle{}) func (fh *FileHandle) Read(ctx context.Context, req *fuse.ReadRequest, resp *fuse.ReadResponse) error { - glog.V(4).Infof("%s read fh %d: [%d,%d) size %d resp.Data len=%d cap=%d", fh.f.fullpath(), fh.handle, req.Offset, req.Offset+int64(req.Size), req.Size, len(resp.Data), cap(resp.Data)) + glog.V(4).Infof("%s read fh %d: [%d,%d) size %d resp.Data cap=%d", fh.f.fullpath(), fh.handle, req.Offset, req.Offset+int64(req.Size), req.Size, cap(resp.Data)) buff := resp.Data[:cap(resp.Data)] if req.Size > cap(resp.Data) { @@ -119,7 +119,7 @@ func (fh *FileHandle) readFromChunks(buff []byte, offset int64) (int64, error) { glog.Errorf("file handle read %s: %v", fh.f.fullpath(), err) } - // glog.V(0).Infof("file handle read %s [%d,%d] %d : %v", fh.f.fullpath(), offset, offset+int64(totalRead), totalRead, err) + glog.V(4).Infof("file handle read %s [%d,%d] %d : %v", fh.f.fullpath(), offset, offset+int64(totalRead), totalRead, err) return int64(totalRead), err } diff --git a/weed/pb/filer_pb/filer_pb_helper.go b/weed/pb/filer_pb/filer_pb_helper.go index 2dc1ebaf8..0ca00d981 100644 --- a/weed/pb/filer_pb/filer_pb_helper.go +++ b/weed/pb/filer_pb/filer_pb_helper.go @@ -81,7 +81,7 @@ func CreateEntry(client SeaweedFilerClient, request *CreateEntryRequest) error { return fmt.Errorf("CreateEntry: %v", err) } if resp.Error != "" { - glog.V(1).Infof("create entry %s/%s %v: %v", request.Directory, request.Entry.Name, request.OExcl, err) + glog.V(1).Infof("create entry %s/%s %v: %v", request.Directory, request.Entry.Name, request.OExcl, resp.Error) return fmt.Errorf("CreateEntry : %v", resp.Error) } return nil