Skip to content

Instantly share code, notes, and snippets.

@mallim
Created June 22, 2014 01:02
Show Gist options
  • Save mallim/0fe19c8168c6133ad4a8 to your computer and use it in GitHub Desktop.
Save mallim/0fe19c8168c6133ad4a8 to your computer and use it in GitHub Desktop.
Console logging stream. Useful for node stream debugging
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