diff --git a/backend/googlephotos/googlephotos.go b/backend/googlephotos/googlephotos.go index ebae7ebb2..b94fbac17 100644 --- a/backend/googlephotos/googlephotos.go +++ b/backend/googlephotos/googlephotos.go @@ -28,7 +28,6 @@ import ( "github.com/rclone/rclone/fs/fserrors" "github.com/rclone/rclone/fs/fshttp" "github.com/rclone/rclone/fs/hash" - "github.com/rclone/rclone/fs/log" "github.com/rclone/rclone/lib/batcher" "github.com/rclone/rclone/lib/encoder" "github.com/rclone/rclone/lib/oauthutil" @@ -454,7 +453,7 @@ func (f *Fs) newObjectWithInfo(ctx context.Context, remote string, info *api.Med // NewObject finds the Object at remote. If it can't be found // it returns the error fs.ErrorObjectNotFound. func (f *Fs) NewObject(ctx context.Context, remote string) (fs.Object, error) { - defer log.Trace(f, "remote=%q", remote)("") + // defer log.Trace(f, "remote=%q", remote)("") return f.newObjectWithInfo(ctx, remote, nil) } @@ -667,7 +666,7 @@ func (f *Fs) listUploads(ctx context.Context, dir string) (entries fs.DirEntries // This should return ErrDirNotFound if the directory isn't // found. func (f *Fs) List(ctx context.Context, dir string) (entries fs.DirEntries, err error) { - defer log.Trace(f, "dir=%q", dir)("err=%v", &err) + // defer log.Trace(f, "dir=%q", dir)("err=%v", &err) match, prefix, pattern := patterns.match(f.root, dir, false) if pattern == nil || pattern.isFile { return nil, fs.ErrorDirNotFound @@ -684,7 +683,7 @@ func (f *Fs) List(ctx context.Context, dir string) (entries fs.DirEntries, err e // // The new object may have been created if an error is returned func (f *Fs) Put(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (fs.Object, error) { - defer log.Trace(f, "src=%+v", src)("") + // defer log.Trace(f, "src=%+v", src)("") // Temporary Object under construction o := &Object{ fs: f, @@ -737,7 +736,7 @@ func (f *Fs) getOrCreateAlbum(ctx context.Context, albumTitle string) (album *ap // Mkdir creates the album if it doesn't exist func (f *Fs) Mkdir(ctx context.Context, dir string) (err error) { - defer log.Trace(f, "dir=%q", dir)("err=%v", &err) + // defer log.Trace(f, "dir=%q", dir)("err=%v", &err) match, prefix, pattern := patterns.match(f.root, dir, false) if pattern == nil { return fs.ErrorDirNotFound @@ -761,7 +760,7 @@ func (f *Fs) Mkdir(ctx context.Context, dir string) (err error) { // // Returns an error if it isn't empty func (f *Fs) Rmdir(ctx context.Context, dir string) (err error) { - defer log.Trace(f, "dir=%q")("err=%v", &err) + // defer log.Trace(f, "dir=%q")("err=%v", &err) match, _, pattern := patterns.match(f.root, dir, false) if pattern == nil { return fs.ErrorDirNotFound @@ -834,7 +833,7 @@ func (o *Object) Hash(ctx context.Context, t hash.Type) (string, error) { // Size returns the size of an object in bytes func (o *Object) Size() int64 { - defer log.Trace(o, "")("") + // defer log.Trace(o, "")("") if !o.fs.opt.ReadSize || o.bytes >= 0 { return o.bytes } @@ -935,7 +934,7 @@ func (o *Object) readMetaData(ctx context.Context) (err error) { // It attempts to read the objects mtime and if that isn't present the // LastModified returned in the http headers func (o *Object) ModTime(ctx context.Context) time.Time { - defer log.Trace(o, "")("") + // defer log.Trace(o, "")("") err := o.readMetaData(ctx) if err != nil { fs.Debugf(o, "ModTime: Failed to read metadata: %v", err) @@ -965,7 +964,7 @@ func (o *Object) downloadURL() string { // Open an object for read func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (in io.ReadCloser, err error) { - defer log.Trace(o, "")("") + // defer log.Trace(o, "")("") err = o.readMetaData(ctx) if err != nil { fs.Debugf(o, "Open: Failed to read metadata: %v", err) @@ -1067,7 +1066,7 @@ func (f *Fs) commitBatch(ctx context.Context, items []uploadedItem, results []*a // // The new object may have been created if an error is returned func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (err error) { - defer log.Trace(o, "src=%+v", src)("err=%v", &err) + // defer log.Trace(o, "src=%+v", src)("err=%v", &err) match, _, pattern := patterns.match(o.fs.root, o.remote, true) if pattern == nil || !pattern.isFile || !pattern.canUpload { return errCantUpload