From f8c75ee85b302c8b63c270bef9e4b403e40be515 Mon Sep 17 00:00:00 2001 From: nvnyale Date: Tue, 17 May 2022 00:21:14 -0400 Subject: [PATCH] Print stack trace when encountering panic --- api/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/server.go b/api/server.go index ca28396..0739dfa 100644 --- a/api/server.go +++ b/api/server.go @@ -125,7 +125,7 @@ func NewServer(config common.Config) error { if config.ListenAddress == "" { config.ListenAddress = ":8080" } - handler := handlers.RecoveryHandler()(handlers.LoggingHandler(os.Stdout, TokenMiddleware([]byte(config.Token), publicURLs, s.router))) + handler := handlers.RecoveryHandler(handlers.PrintRecoveryStack(true))(handlers.LoggingHandler(os.Stdout, TokenMiddleware([]byte(config.Token), publicURLs, s.router))) srv := &http.Server{ Handler: handler, Addr: config.ListenAddress,