Skip to content

Commit

Permalink
NOM-104: JSON formatter should write a newline at the end of the reco…
Browse files Browse the repository at this point in the history
…rd (#17)
  • Loading branch information
pirogoeth authored Sep 30, 2019
1 parent d5f3b5e commit 08ead5e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions common/formatter.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ func (f *JSONFormater) Format(entry *logrus.Entry) ([]byte, error) {
if w.Error != nil {
return nil, errors.Wrap(w.Error, "while marshalling json")
}

// Append a newline to the formatted record
w.Buffer.AppendByte(byte(0x0a))

buf := w.Buffer.BuildBytes()

return buf, nil
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.4.0
1.4.1

0 comments on commit 08ead5e

Please sign in to comment.