summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/web.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/web.go b/cmd/web.go
index 6953e7c64f..963c816207 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)