1
0
mirror of https://github.com/rclone/rclone.git synced 2025-03-28 12:42:08 +02:00

Log all objects more informatively

This commit is contained in:
Nick Craig-Wood 2015-03-09 08:11:38 +00:00
parent 81a933ae38
commit 873db29391

View File

@ -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)