update
parent
3e574be3c4
commit
d06ee14e9d
|
@ -8,7 +8,7 @@ import (
|
|||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
//User User model
|
||||
// User User model
|
||||
type User struct {
|
||||
ID string `gorm:"primaryKey"`
|
||||
|
||||
|
|
|
@ -32,10 +32,9 @@ func (srv *Service) Default(c *gin.Context) {
|
|||
c.Abort()
|
||||
cl.Str("error", fmt.Sprint(err))
|
||||
}
|
||||
if !util.PROD {
|
||||
cl.Caller(2)
|
||||
// cl.Str("trace", util.Stack())
|
||||
}
|
||||
// if !util.PROD {
|
||||
// cl.Str("trace", util.Stack())
|
||||
// }
|
||||
} else if c.Writer.Status() >= 400 {
|
||||
cl = srv.l.Error().Strs("error", c.Errors.Errors())
|
||||
} else {
|
||||
|
@ -47,6 +46,9 @@ 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()).
|
||||
|
|
Loading…
Reference in New Issue