mirror of
https://github.com/tgdrive/teldrive.git
synced 2025-02-24 15:05:41 +08:00
chore: Add gin recovery middleware for error handling
This commit is contained in:
parent
c500e0f8e0
commit
bde8806a52
1 changed files with 2 additions and 0 deletions
|
@ -210,6 +210,8 @@ func initApp(lc fx.Lifecycle, cfg *config.Config, c *controller.Controller) *gin
|
|||
|
||||
r := gin.New()
|
||||
|
||||
r.Use(gin.Recovery())
|
||||
|
||||
r.Use(ginzap.GinzapWithConfig(logging.DefaultLogger().Desugar(), &ginzap.Config{
|
||||
TimeFormat: time.RFC3339,
|
||||
UTC: true,
|
||||
|
|
Loading…
Reference in a new issue