Merge pull request #200 from freeformz/no_msg

Don't emit a msg if there is none to emit
This commit is contained in:
Simon Eskildsen 2015-10-05 07:44:10 -04:00
commit c69e603431
1 changed files with 3 additions and 1 deletions

View File

@ -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])
}