优化快捷方法&处理重复打印的BUG

This commit is contained in:
Yun
2024-04-21 12:23:26 +08:00
parent 864b1ae117
commit 328dadb308
4 changed files with 64 additions and 5 deletions
+5 -1
View File
@@ -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)
}
}
}
}