Audit use of log.Print and change to Debug, Log, or ErrorLog as appropriate

This commit is contained in:
Nick Craig-Wood
2016-06-06 21:23:54 +01:00
parent 4882b8ba67
commit 67d0375b98
7 changed files with 32 additions and 34 deletions
+2 -2
View File
@@ -16,6 +16,7 @@ import (
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/oauthutil"
yandex "github.com/ncw/rclone/yandex/api"
"github.com/pkg/errors"
"golang.org/x/oauth2"
)
@@ -553,8 +554,7 @@ func mkDirExecute(client *yandex.Client, path string) (int, string, error) {
}
if err != nil {
// error creating directory
log.Printf("Failed to create folder: %v", err)
return statusCode, jsonErrorString, err
return statusCode, jsonErrorString, errors.Wrap(err, "failed to create folder")
}
return 0, "", nil
}