From 80645055bc834e075fc2d8bc17c63a1979cb8a84 Mon Sep 17 00:00:00 2001 From: qydysky Date: Tue, 15 Sep 2020 06:51:11 +0800 Subject: [PATCH] 60 --- Log.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Log.go b/Log.go index b38f4c4..35f562d 100644 --- a/Log.go +++ b/Log.go @@ -105,6 +105,11 @@ func (I *logl) New() (O *logl) { func (O *logl) logf(file *os.File) (int) { var tmp int + var showObj []io.Writer + + if file != nil {showObj = append(showObj, file)} + if file == nil || !O.fileonly {showObj = append(showObj, os.Stdout)} + for len(O.channelN) != 0 { channelN := <- O.channelN @@ -117,10 +122,6 @@ func (O *logl) logf(file *os.File) (int) { if channelN >= 0 && channelN < O.level {continue} - var showObj []io.Writer - if file != nil {showObj = append(showObj, file)} - if file == nil || !O.fileonly {showObj = append(showObj, os.Stdout)} - switch channelN { case blockErr: tmp = channelN -- 2.39.2