Fix "could not write" error missing carriage return

This commit is contained in:
Olivier Poitrey 2018-11-07 15:20:33 -08:00
parent a4c54e5d8b
commit 3f112dae87
1 changed files with 2 additions and 1 deletions

View File

@ -137,7 +137,8 @@ func (e *Event) msg(msg string) {
defer e.done(msg)
}
if err := e.write(); err != nil {
fmt.Fprintf(os.Stderr, "zerolog: could not write event: %v", err)
fmt.Fprintf(os.Stderr,
`{"%s": "zerolog: could not write event: %v"}\n`, MessageFieldName, err)
}
}