feat: init

This commit is contained in:
Rogee
2024-12-25 17:49:29 +08:00
parent 77e36d5aaf
commit 28735f506f
6 changed files with 219 additions and 164 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()))
},
}))