forked from TrueCloudLab/rclone
Log all objects more informatively
This commit is contained in:
parent
81a933ae38
commit
873db29391
1 changed files with 2 additions and 2 deletions
4
fs/fs.go
4
fs/fs.go
|
@ -244,8 +244,8 @@ func NewFs(path string) (Fs, error) {
|
||||||
// Outputs log for object
|
// Outputs log for object
|
||||||
func OutputLog(o interface{}, text string, args ...interface{}) {
|
func OutputLog(o interface{}, text string, args ...interface{}) {
|
||||||
description := ""
|
description := ""
|
||||||
if x, ok := o.(fmt.Stringer); ok {
|
if o != nil {
|
||||||
description = x.String() + ": "
|
description = fmt.Sprintf("%v: ", o)
|
||||||
}
|
}
|
||||||
out := fmt.Sprintf(text, args...)
|
out := fmt.Sprintf(text, args...)
|
||||||
log.Print(description + out)
|
log.Print(description + out)
|
||||||
|
|
Loading…
Reference in a new issue