Skip to content

Commit

Permalink
[patch] skip buffering when mode is none (#99)
Browse files Browse the repository at this point in the history
Signed-off-by: kpango <[email protected]>
  • Loading branch information
kpango authored Jun 17, 2021
1 parent 9087a96 commit 502d75a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions glg.go
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,10 @@ func (g *Glg) out(level LEVEL, format string, val ...interface{}) error {
return fmt.Errorf("error:\tLog Level %d Not Found", level)
}

if log.mode == NONE {
return nil
}

if g.enableJSON {
var w io.Writer
switch log.writeMode {
Expand Down

0 comments on commit 502d75a

Please sign in to comment.