Skip to content

Commit

Permalink
Print stack trace when encountering panic
Browse files Browse the repository at this point in the history
  • Loading branch information
nvnyale committed May 17, 2022
1 parent a683732 commit f8c75ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f8c75ee

Please sign in to comment.