优化快捷方法&处理重复打印的BUG
This commit is contained in:
+5
-1
@@ -95,7 +95,11 @@ func SetTimeZone() Option {
|
||||
// 文件额外的驱动
|
||||
func SetExtraDriver(ds ...io.Writer) Option {
|
||||
return func(o *loggerOption) {
|
||||
o.drivers = ds
|
||||
for _, d := range ds {
|
||||
if d != nil {
|
||||
o.drivers = append(o.drivers, d)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user