mirror of
https://gitee.com/johng/gf
synced 2026-07-01 11:29:48 +08:00
新增glog控制台打印开关,修正一处细节遗漏
This commit is contained in:
@ -109,9 +109,10 @@ func (l *Logger) print(defaultIO io.Writer, s string) {
|
||||
w := l.GetIO()
|
||||
if w == nil {
|
||||
if v := l.getFileByPool(); v != nil {
|
||||
w = v.File()
|
||||
// 同时输出到文件和终端 @author zseeker
|
||||
if stdprint {
|
||||
w = io.MultiWriter(v.File(), os.Stdout)
|
||||
w = io.MultiWriter(w, os.Stdout)
|
||||
}
|
||||
defer v.Close()
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user