diff --git a/server/middleware.go b/server/middleware.go index b4d7c9f..db89fe5 100644 --- a/server/middleware.go +++ b/server/middleware.go @@ -33,8 +33,8 @@ func (srv *Service) Default(c *gin.Context) { cl.Str("error", fmt.Sprint(err)) } if !util.PROD { - cl.Caller(3) - cl.Str("trace", util.Stack()) + cl.Caller(2) + // cl.Str("trace", util.Stack()) } } else if c.Writer.Status() >= 400 { cl = srv.l.Error().Strs("error", c.Errors.Errors()) diff --git a/system/setup.go b/system/setup.go index cf3f53f..28a0186 100644 --- a/system/setup.go +++ b/system/setup.go @@ -51,7 +51,7 @@ func Setup() { zerolog.DurationFieldInteger = true zerolog.SetGlobalLevel(zerolog.Level(viper.GetInt("log.level"))) util.PROD = viper.GetBool("prod") - if util.PROD { + if !util.PROD { log.Logger = log.With().Caller().Logger() } if viper.GetBool("log.pretty") {