aboutsummaryrefslogtreecommitdiff
path: root/weed/mount/filehandle_read.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/mount/filehandle_read.go')
-rw-r--r--weed/mount/filehandle_read.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/weed/mount/filehandle_read.go b/weed/mount/filehandle_read.go
index ce5f96341..c455b3624 100644
--- a/weed/mount/filehandle_read.go
+++ b/weed/mount/filehandle_read.go
@@ -6,7 +6,7 @@ import (
"io"
"github.com/seaweedfs/seaweedfs/weed/filer"
- "github.com/seaweedfs/seaweedfs/weed/glog"
+ "github.com/seaweedfs/seaweedfs/weed/util/log"
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
)
@@ -31,10 +31,10 @@ func (fh *FileHandle) readFromChunks(buff []byte, offset int64) (int64, int64, e
entry := fh.GetEntry()
if entry.IsInRemoteOnly() {
- glog.V(4).Infof("download remote entry %s", fileFullPath)
+ log.V(-1).Infof("download remote entry %s", fileFullPath)
err := fh.downloadRemoteEntry(entry)
if err != nil {
- glog.V(1).Infof("download remote entry %s: %v", fileFullPath, err)
+ log.V(2).Infof("download remote entry %s: %v", fileFullPath, err)
return 0, 0, err
}
}
@@ -45,28 +45,28 @@ func (fh *FileHandle) readFromChunks(buff []byte, offset int64) (int64, int64, e
}
if fileSize == 0 {
- glog.V(1).Infof("empty fh %v", fileFullPath)
+ log.V(2).Infof("empty fh %v", fileFullPath)
return 0, 0, io.EOF
} else if offset == fileSize {
return 0, 0, io.EOF
} else if offset >= fileSize {
- glog.V(1).Infof("invalid read, fileSize %d, offset %d for %s", fileSize, offset, fileFullPath)
+ log.V(2).Infof("invalid read, fileSize %d, offset %d for %s", fileSize, offset, fileFullPath)
return 0, 0, io.EOF
}
if offset < int64(len(entry.Content)) {
totalRead := copy(buff, entry.Content[offset:])
- glog.V(4).Infof("file handle read cached %s [%d,%d] %d", fileFullPath, offset, offset+int64(totalRead), totalRead)
+ log.V(-1).Infof("file handle read cached %s [%d,%d] %d", fileFullPath, offset, offset+int64(totalRead), totalRead)
return int64(totalRead), 0, nil
}
totalRead, ts, err := fh.entryChunkGroup.ReadDataAt(fileSize, buff, offset)
if err != nil && err != io.EOF {
- glog.Errorf("file handle read %s: %v", fileFullPath, err)
+ log.Errorf("file handle read %s: %v", fileFullPath, err)
}
- // glog.V(4).Infof("file handle read %s [%d,%d] %d : %v", fileFullPath, offset, offset+int64(totalRead), totalRead, err)
+ // log.V(-1).Infof("file handle read %s [%d,%d] %d : %v", fileFullPath, offset, offset+int64(totalRead), totalRead, err)
return int64(totalRead), ts, err
}
@@ -83,7 +83,7 @@ func (fh *FileHandle) downloadRemoteEntry(entry *LockedEntry) error {
Name: entry.Name,
}
- glog.V(4).Infof("download entry: %v", request)
+ log.V(-1).Infof("download entry: %v", request)
resp, err := client.CacheRemoteObjectToLocalCluster(context.Background(), request)
if err != nil {
return fmt.Errorf("CacheRemoteObjectToLocalCluster file %s: %v", fileFullPath, err)