mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
Merge pull request #2789 from kolyshkin/error-trace
This commit is contained in:
@@ -55,6 +55,8 @@ func logrusToStderr() bool {
|
||||
func fatal(err error) {
|
||||
// make sure the error is written to the logger
|
||||
logrus.Error(err)
|
||||
// If debug is enabled and pkg/errors was used, show its stack trace.
|
||||
logrus.Debugf("%+v", err)
|
||||
if !logrusToStderr() {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user