summaryrefslogtreecommitdiff
path: root/cmd/podman/root.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-04-15 09:08:37 -0400
committerGitHub <noreply@github.com>2021-04-15 09:08:37 -0400
commit405331ff9072e6febed123aafdc365517917ab44 (patch)
tree0e965ca02fe57c2c0110d17c46dcdbd7ab68aebf /cmd/podman/root.go
parentb2a3bb4a6180b390c87565c49798990384f16976 (diff)
parentbc86c50cd81bc3267ec8b9840e1a0e705231f336 (diff)
downloadpodman-405331ff9072e6febed123aafdc365517917ab44.tar.gz
podman-405331ff9072e6febed123aafdc365517917ab44.tar.bz2
podman-405331ff9072e6febed123aafdc365517917ab44.zip
Merge pull request #10032 from nalind/trace-level
Recognize "trace" logging, and use it for lone errors at exit
Diffstat (limited to 'cmd/podman/root.go')
-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
}