summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/podman/root.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/podman/root.go b/cmd/podman/root.go
index 4527c2646..9e5d2a236 100644
--- a/cmd/podman/root.go
+++ b/cmd/podman/root.go
@@ -416,7 +416,11 @@ func formatError(err error) string {
strings.TrimSuffix(err.Error(), ": "+define.ErrOCIRuntime.Error()),
)
} else {
- message = "Error: " + err.Error()
+ if logrus.IsLevelEnabled(logrus.TraceLevel) {
+ message = fmt.Sprintf("Error: %+v", err)
+ } else {
+ message = fmt.Sprintf("Error: %v", err)
+ }
}
return message
}