From: qydysky Date: Mon, 14 Sep 2020 22:51:11 +0000 (+0800) Subject: 60 X-Git-Tag: v0.0.2~17 X-Git-Url: http://127.0.0.1:8081/?a=commitdiff_plain;h=80645055bc834e075fc2d8bc17c63a1979cb8a84;p=part%2F.git 60 --- 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