aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-01-24 22:01:51 -0800
committerChris Lu <chris.lu@gmail.com>2020-01-24 22:01:51 -0800
commit6e25acc6818d95b8ea60cd6b3c314d589e724ceb (patch)
treeb2c7bb356f62a46b8dca7625ed064a3f531603ab
parent09bf256fc6993bcd8eaf7983a7e335a6a37826ab (diff)
downloadseaweedfs-6e25acc6818d95b8ea60cd6b3c314d589e724ceb.tar.xz
seaweedfs-6e25acc6818d95b8ea60cd6b3c314d589e724ceb.zip
add logging
-rw-r--r--weed/filer2/filer.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/weed/filer2/filer.go b/weed/filer2/filer.go
index f95dce4df..f7d782d62 100644
--- a/weed/filer2/filer.go
+++ b/weed/filer2/filer.go
@@ -122,6 +122,7 @@ func (f *Filer) CreateEntry(ctx context.Context, entry *Entry, o_excl bool) erro
mkdirErr := f.store.InsertEntry(ctx, dirEntry)
if mkdirErr != nil {
if _, err := f.FindEntry(ctx, FullPath(dirPath)); err == ErrNotFound {
+ glog.V(3).Infof("mkdir %s: %v", dirPath, mkdirErr)
return fmt.Errorf("mkdir %s: %v", dirPath, mkdirErr)
}
} else {
@@ -165,6 +166,7 @@ func (f *Filer) CreateEntry(ctx context.Context, entry *Entry, o_excl bool) erro
}
} else {
if o_excl {
+ glog.V(3).Infof("EEXIST: entry %s already exists", entry.FullPath)
return fmt.Errorf("EEXIST: entry %s already exists", entry.FullPath)
}
if err := f.UpdateEntry(ctx, oldEntry, entry); err != nil {
@@ -173,7 +175,7 @@ func (f *Filer) CreateEntry(ctx context.Context, entry *Entry, o_excl bool) erro
}
}
- // glog.V(4).Infof("CreateEntry %s: created", entry.FullPath)
+ glog.V(4).Infof("CreateEntry %s: created", entry.FullPath)
f.NotifyUpdateEvent(oldEntry, entry, true)