Revert the wrapping of write errors

All errors generated by Go libraries on stderr won't be json encoded
anyway, so it does not make sense to have such a treatment for this one.
This commit is contained in:
Olivier Poitrey 2018-11-08 14:49:44 -08:00
parent 3f112dae87
commit 8e30c71369
1 changed files with 1 additions and 2 deletions

View File

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