feat(log): print traceback when panics occur (#2166)

Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
peusebiu
2024-01-16 19:08:14 +02:00
committed by GitHub
parent d1bf713573
commit ee9bbb0bf2
6 changed files with 122 additions and 9 deletions
+2 -4
View File
@@ -14,7 +14,6 @@ import (
"syscall"
"time"
"github.com/gorilla/handlers"
"github.com/gorilla/mux"
"github.com/zitadel/oidc/pkg/client/rp"
@@ -117,9 +116,8 @@ func (c *Controller) Run() error {
engine.Use(
SessionLogger(c),
handlers.RecoveryHandler(
handlers.PrintRecoveryStack(true),
))
RecoveryHandler(c.Log),
)
if c.Audit != nil {
engine.Use(SessionAuditLogger(c.Audit))