You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
golog/gin_slog_custom_config.go

21 lines
439 B

package golog
// ConfigSLogClientFun 日志配置
func (c *GinSLogCustom) ConfigSLogClientFun(sLogFun SLogFun) {
sLog := sLogFun()
if sLog != nil {
c.slog.client = sLog
c.slog.status = true
}
}
// ConfigSLogResultClientFun 日志配置然后返回
func (c *GinSLogCustom) ConfigSLogResultClientFun(sLogFun SLogFun) *GinSLogCustom {
sLog := sLogFun()
if sLog != nil {
c.slog.client = sLog
c.slog.status = true
}
return c
}