From 0ef6997f409884220ba4b18a0f67e9bdeb19a92e Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Sat, 12 Jan 2019 20:10:45 -0500 Subject: [PATCH] mlog: fix bug which caused the DefaultHandler to not ever call Flush --- mlog/mlog.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlog/mlog.go b/mlog/mlog.go index 311c6a8..406cdaa 100644 --- a/mlog/mlog.go +++ b/mlog/mlog.go @@ -240,7 +240,7 @@ func DefaultHandler() Handler { defer l.Unlock() err := DefaultFormat(bw, msg) - if err != nil { + if err == nil { err = bw.Flush() } return err