master
Evan Chen 2021-12-24 12:25:45 +08:00
parent d06ee14e9d
commit ab1721c04e
1 changed files with 4 additions and 6 deletions

View File

@ -32,9 +32,10 @@ func (srv *Service) Default(c *gin.Context) {
c.Abort()
cl.Str("error", fmt.Sprint(err))
}
// if !util.PROD {
// cl.Str("trace", util.Stack())
// }
if !util.PROD {
cl.Caller(2)
// cl.Str("trace", util.Stack())
}
} else if c.Writer.Status() >= 400 {
cl = srv.l.Error().Strs("error", c.Errors.Errors())
} else {
@ -46,9 +47,6 @@ func (srv *Service) Default(c *gin.Context) {
if usr, ok := c.Get("user"); ok {
cl.Str("user", usr.(string))
}
if !util.PROD {
cl.Caller(2)
}
cl.
Str("method", c.Request.Method).
Str("ip", c.ClientIP()).