Created
June 22, 2014 01:02
-
-
Save mallim/0fe19c8168c6133ad4a8 to your computer and use it in GitHub Desktop.
Console logging stream. Useful for node stream debugging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var es = require('event-stream'); | |
var logger = es.mapSync(function (data) { //create a stream that logs to stderr, | |
console.error(data); | |
return data; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment