diff --git a/cmd/web.go b/cmd/web.go index 6953e7c64f5..963c8162074 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -86,6 +86,11 @@ func runWeb(ctx *cli.Context) error { _ = log.DelLogger("console") log.NewLogger(0, "console", "console", fmt.Sprintf(`{"level": "fatal", "colorize": %t, "stacktraceLevel": "none"}`, log.CanColorStdout)) } + defer func() { + if panicked := recover(); panicked != nil { + log.Fatal("PANIC: %v\n%s", panicked, string(log.Stack(2))) + } + }() managerCtx, cancel := context.WithCancel(context.Background()) graceful.InitManager(managerCtx)