Skip to content

Commit

Permalink
Add error handler to pump
Browse files Browse the repository at this point in the history
  • Loading branch information
jsumners committed Feb 7, 2017
1 parent a5c1db5 commit cf1e18e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pino.js
Expand Up @@ -39,7 +39,9 @@ function pino (opts, stream) {
if (iopts.prettyPrint) {
var pstream = pretty(iopts.prettyPrint)
var origStream = istream
pump(pstream, origStream)
pump(pstream, origStream, function (err) {
if (err) logger.emit('error', err)
})
istream = pstream
}

Expand Down

0 comments on commit cf1e18e

Please sign in to comment.