aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-01-25 00:31:53 -0800
committerChris Lu <chris.lu@gmail.com>2020-01-25 00:31:53 -0800
commit8a42aa822176dc71795318374c359a2794bc2356 (patch)
tree69ef20665458e40d41e03a1cb47f48cd84f14459
parent28d1b348564b7aa0e61c894136c6b882367966e5 (diff)
downloadseaweedfs-8a42aa822176dc71795318374c359a2794bc2356.tar.xz
seaweedfs-8a42aa822176dc71795318374c359a2794bc2356.zip
adjust logging
-rw-r--r--weed/filer2/filer.go3
-rw-r--r--weed/filer2/filer_client_util.go6
-rw-r--r--weed/filesys/dir.go2
-rw-r--r--weed/filesys/xattr.go4
4 files changed, 7 insertions, 8 deletions
diff --git a/weed/filer2/filer.go b/weed/filer2/filer.go
index ce6bb8133..c603777bd 100644
--- a/weed/filer2/filer.go
+++ b/weed/filer2/filer.go
@@ -74,8 +74,6 @@ func (f *Filer) RollbackTransaction(ctx context.Context) error {
func (f *Filer) CreateEntry(ctx context.Context, entry *Entry, o_excl bool) error {
- glog.V(4).Infof("CreateEntry create %s", entry.FullPath)
-
if string(entry.FullPath) == "/" {
return nil
}
@@ -159,6 +157,7 @@ func (f *Filer) CreateEntry(ctx context.Context, entry *Entry, o_excl bool) erro
oldEntry, _ := f.FindEntry(ctx, entry.FullPath)
+ glog.V(4).Infof("CreateEntry %s: old entry : %v", entry.FullPath, oldEntry)
if oldEntry == nil {
if err := f.store.InsertEntry(ctx, entry); err != nil {
glog.Errorf("insert entry %s: %v", entry.FullPath, err)
diff --git a/weed/filer2/filer_client_util.go b/weed/filer2/filer_client_util.go
index b1c579447..1c5af7fe2 100644
--- a/weed/filer2/filer_client_util.go
+++ b/weed/filer2/filer_client_util.go
@@ -104,18 +104,18 @@ func GetEntry(ctx context.Context, filerClient FilerClient, fullFilePath FullPat
Name: name,
}
- glog.V(3).Infof("read %s request: %v", fullFilePath, request)
+ // glog.V(3).Infof("read %s request: %v", fullFilePath, request)
resp, err := client.LookupDirectoryEntry(ctx, request)
if err != nil {
if err == ErrNotFound || strings.Contains(err.Error(), ErrNotFound.Error()) {
return nil
}
- glog.V(3).Infof("read %s attr %v: %v", fullFilePath, request, err)
+ glog.V(3).Infof("read %s %v: %v", fullFilePath, resp, err)
return err
}
if resp.Entry == nil {
- glog.V(3).Infof("read %s entry: %v", fullFilePath, entry)
+ // glog.V(3).Infof("read %s entry: %v", fullFilePath, entry)
return nil
}
diff --git a/weed/filesys/dir.go b/weed/filesys/dir.go
index 4687d5c91..b783cbcbe 100644
--- a/weed/filesys/dir.go
+++ b/weed/filesys/dir.go
@@ -196,7 +196,7 @@ func (dir *Dir) Lookup(ctx context.Context, req *fuse.LookupRequest, resp *fuse.
entry := dir.wfs.cacheGet(fullFilePath)
if entry == nil {
- glog.V(3).Infof("dir Lookup cache miss %s", fullFilePath)
+ // glog.V(3).Infof("dir Lookup cache miss %s", fullFilePath)
entry, err = filer2.GetEntry(ctx, dir.wfs, fullFilePath)
if err != nil {
glog.V(1).Infof("dir GetEntry %s: %v", fullFilePath, err)
diff --git a/weed/filesys/xattr.go b/weed/filesys/xattr.go
index 52a447d95..75ba0f2ba 100644
--- a/weed/filesys/xattr.go
+++ b/weed/filesys/xattr.go
@@ -115,7 +115,7 @@ func (wfs *WFS) maybeLoadEntry(ctx context.Context, dir, name string) (entry *fi
if entry != nil {
return
}
- glog.V(3).Infof("read entry cache miss %s", fullpath)
+ // glog.V(3).Infof("read entry cache miss %s", fullpath)
err = wfs.WithFilerClient(ctx, func(client filer_pb.SeaweedFilerClient) error {
@@ -130,7 +130,7 @@ func (wfs *WFS) maybeLoadEntry(ctx context.Context, dir, name string) (entry *fi
glog.V(3).Infof("file attr read not found file %v: %v", request, err)
return fuse.ENOENT
}
- glog.V(3).Infof("file attr read file %v: %v", request, err)
+ glog.V(3).Infof("attr read %v: %v", request, err)
return fuse.EIO
}