rvagg/through2 — pull request #33 by maxogden (2014-11-18 08:09:49+00:00)
Title: debug logging

I've had this in the back of my mind forever and finally decided to give it a go today. I often want to do e.g. `DEBUG=through2` to see the start, transform and end state of through2 streams when debugging. This is a first pass at doing so. It's just a proposal right now -- I'm open to feedback.

Example output:

![screen shot 2014-11-18 at 4 07 20 pm](https://cloud.githubusercontent.com/assets/39759/5084133/088ab782-6f3d-11e4-8baa-57d0fe87eac9.png)

I tried to do it in a way that wouldn't add a dependency and also wouldn't impact perf. I think having this logic in through2 makes sense because it is used so widely. I thought about putting the debug module in another module called e.g. `through2-debug` but I personally don't think that would be as widely useful for debugging.

I also am open to suggestions on how to test this.