Skip to content
This repository has been archived by the owner on Jun 5, 2018. It is now read-only.

Commit

Permalink
Don't emit a msg if there is none to emit
Browse files Browse the repository at this point in the history
  • Loading branch information
Edward Muller committed Sep 8, 2015
1 parent 418b41d commit 9ca7d9f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion text_formatter.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ func (f *TextFormatter) Format(entry *Entry) ([]byte, error) {
f.appendKeyValue(b, "time", entry.Time.Format(timestampFormat))
}
f.appendKeyValue(b, "level", entry.Level.String())
f.appendKeyValue(b, "msg", entry.Message)
if entry.Message != "" {
f.appendKeyValue(b, "msg", entry.Message)
}
for _, key := range keys {
f.appendKeyValue(b, key, entry.Data[key])
}
Expand Down

0 comments on commit 9ca7d9f

Please sign in to comment.