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

Commit

Permalink
Merge pull request sirupsen#200 from freeformz/no_msg
Browse files Browse the repository at this point in the history
Don't emit a msg if there is none to emit
  • Loading branch information
sirupsen committed Oct 5, 2015
2 parents 05fe8fb + 9ca7d9f commit c69e603
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 c69e603

Please sign in to comment.