fix: 修复 log 日志切割不生效问题
This commit is contained in:
parent
b4ade2c003
commit
9068c57299
|
@ -12,8 +12,10 @@ type Encoder struct {
|
|||
conf *Config
|
||||
}
|
||||
|
||||
func (slf *Encoder) Split(config *lumberjack.Logger) *Encoder {
|
||||
slf.cores = append(slf.cores, zapcore.NewCore(slf.e, zapcore.AddSync(config), zapcore.DebugLevel))
|
||||
func (slf *Encoder) Split(config *lumberjack.Logger, level LevelEnabler) *Encoder {
|
||||
slf.cores = append(slf.cores, zapcore.NewCore(slf.e,
|
||||
zapcore.NewMultiWriteSyncer(zapcore.AddSync(config)),
|
||||
level))
|
||||
return slf
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue