fix: issues

This commit is contained in:
Rogee
2024-12-19 10:22:25 +08:00
parent db05ee4265
commit 32b8efe5ad
4 changed files with 28 additions and 1 deletions

View File

@@ -70,7 +70,7 @@ func Provide(opts ...opt.Option) error {
engine.Use(recover.New(recover.Config{
EnableStackTrace: true,
StackTraceHandler: func(c fiber.Ctx, e any) {
log.WithError(e.(error)).Error(fmt.Sprintf("panic: %v\n%s\n", e, debug.Stack()))
log.Error(fmt.Sprintf("panic: %v\n%s\n", e, debug.Stack()))
},
}))