diff --git a/cmd/camput/camput.go b/cmd/camput/camput.go index bf2482222..fd80a8c2e 100644 --- a/cmd/camput/camput.go +++ b/cmd/camput/camput.go @@ -100,7 +100,7 @@ func initUploader() { func handleResult(what string, pr *client.PutResult, err error) error { if err != nil { - log.Printf("Error putting %s: %s", what, err) + cmdmain.Errorf("Error putting %s: %s\n", what, err) cmdmain.ExitWithFailure = true return err } diff --git a/pkg/cmdmain/cmdmain.go b/pkg/cmdmain/cmdmain.go index 1e250fb47..bc1eff592 100644 --- a/pkg/cmdmain/cmdmain.go +++ b/pkg/cmdmain/cmdmain.go @@ -290,7 +290,7 @@ func Main() { if err != nil { if !ExitWithFailure { // because it was already logged if ExitWithFailure - log.Printf("Error: %v", err) + Errorf("Error: %v\n", err) } Exit(2) }