mirror of https://github.com/sirupsen/logrus.git
Merge pull request #200 from freeformz/no_msg
Don't emit a msg if there is none to emit
This commit is contained in:
commit
c69e603431
|
@ -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())
|
||||
if entry.Message != "" {
|
||||
f.appendKeyValue(b, "msg", entry.Message)
|
||||
}
|
||||
for _, key := range keys {
|
||||
f.appendKeyValue(b, key, entry.Data[key])
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue