mirror of
https://github.com/rclone/rclone
synced 2024-12-22 13:03:02 +01:00
Tidy logging
This commit is contained in:
parent
a287e3ced7
commit
85f8552c4d
@ -10,7 +10,6 @@ package drive
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"log"
|
|
||||||
"mime"
|
"mime"
|
||||||
"net/http"
|
"net/http"
|
||||||
"path"
|
"path"
|
||||||
@ -642,7 +641,7 @@ func (f *FsDrive) List() fs.ObjectsChan {
|
|||||||
err := f.findRoot(false)
|
err := f.findRoot(false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fs.Stats.Error()
|
fs.Stats.Error()
|
||||||
log.Printf("Couldn't find root: %s", err)
|
fs.Log(f, "Couldn't find root: %s", err)
|
||||||
} else {
|
} else {
|
||||||
if f.root == "" && *driveFullList {
|
if f.root == "" && *driveFullList {
|
||||||
err = f.listDirFull(f.rootId, "", out)
|
err = f.listDirFull(f.rootId, "", out)
|
||||||
@ -651,7 +650,7 @@ func (f *FsDrive) List() fs.ObjectsChan {
|
|||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fs.Stats.Error()
|
fs.Stats.Error()
|
||||||
log.Printf("List failed: %s", err)
|
fs.Log(f, "List failed: %s", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
@ -666,7 +665,7 @@ func (f *FsDrive) ListDir() fs.DirChan {
|
|||||||
err := f.findRoot(false)
|
err := f.findRoot(false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fs.Stats.Error()
|
fs.Stats.Error()
|
||||||
log.Printf("Couldn't find root: %s", err)
|
fs.Log(f, "Couldn't find root: %s", err)
|
||||||
} else {
|
} else {
|
||||||
_, err := f.listAll(f.rootId, "", true, false, func(item *drive.File) bool {
|
_, err := f.listAll(f.rootId, "", true, false, func(item *drive.File) bool {
|
||||||
dir := &fs.Dir{
|
dir := &fs.Dir{
|
||||||
@ -680,7 +679,7 @@ func (f *FsDrive) ListDir() fs.DirChan {
|
|||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fs.Stats.Error()
|
fs.Stats.Error()
|
||||||
log.Printf("ListDir failed: %s", err)
|
fs.Log(f, "ListDir failed: %s", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
@ -363,7 +363,7 @@ func main() {
|
|||||||
fmt.Println(fs.Stats)
|
fmt.Println(fs.Stats)
|
||||||
}
|
}
|
||||||
if fs.Config.Verbose {
|
if fs.Config.Verbose {
|
||||||
log.Printf("*** Go routines at exit %d\n", runtime.NumGoroutine())
|
fs.Debug(nil, "Go routines at exit %d\n", runtime.NumGoroutine())
|
||||||
}
|
}
|
||||||
if fs.Stats.Errored() {
|
if fs.Stats.Errored() {
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
|
2
s3/s3.go
2
s3/s3.go
@ -7,7 +7,6 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"log"
|
|
||||||
"mime"
|
"mime"
|
||||||
"net/http"
|
"net/http"
|
||||||
"path"
|
"path"
|
||||||
@ -309,7 +308,6 @@ func (f *FsS3) list(directories bool, fn func(string, *s3.Key)) {
|
|||||||
if marker == "" {
|
if marker == "" {
|
||||||
marker = objects.Contents[len(objects.Contents)-1].Key
|
marker = objects.Contents[len(objects.Contents)-1].Key
|
||||||
}
|
}
|
||||||
log.Printf("retry with marker = %q", marker)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user