From 873db2939141e1919489d66647cd96cd6201b6c7 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Mon, 9 Mar 2015 08:11:38 +0000 Subject: [PATCH] Log all objects more informatively --- fs/fs.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)