Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

Log all objects more informatively

Nick Craig-Wood873db2939141
diff --git a/fs/fs.go b/fs/fs.go
index e666997ac..9da2abaa7 100644
--- a/fs/fs.go
+++ b/fs/fs.go
@@ -244,8 +244,8 @@ func NewFs(path string) (Fs, error) {
// Outputs log for object
func OutputLog(o interface{}, text string, args ...interface{}) {
description := ""
- if x, ok := o.(fmt.Stringer); ok {
- description = x.String() + ": "
+ if o != nil {
+ description = fmt.Sprintf("%v: ", o)
}
out := fmt.Sprintf(text, args...)
log.Print(description + out)