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_cofing.go

21 lines
428 B

2 years ago
package golog
5 months ago
// ConfigSLogClientFun 日志配置
5 months ago
func (gl *GinSLog) ConfigSLogClientFun(sLogFun SLogFun) {
5 months ago
sLog := sLogFun()
if sLog != nil {
5 months ago
gl.slog.client = sLog
gl.slog.status = true
5 months ago
}
}
2 years ago
5 months ago
// ConfigSLogResultClientFun 日志配置然后返回
5 months ago
func (gl *GinSLog) ConfigSLogResultClientFun(sLogFun SLogFun) *GinSLog {
5 months ago
sLog := sLogFun()
if sLog != nil {
5 months ago
gl.slog.client = sLog
gl.slog.status = true
5 months ago
}
5 months ago
return gl
2 years ago
}