isaacs/npm — pull request #2530 by rvagg (2012-06-17 06:30:00+00:00)
Title: `logstream` option to replace removed `logfd`

We've been using the `logfd` option via the npm API in Ender (see [here](https://github.com/ender-js/Ender/blob/1.0-wip/lib/repository.js#L79-82)) to redirect output to a temporary file which is deleted if there are no errors. Now with the new *npmlog* package we can't do that and `logfd` is (almost) completely removed from npm without a replacement. `outfd` still works fine but now we get `stderr` from npmlog that we can't capture.

This PR is pretty simple, it simply allows a `logstream` option which is passed to npmlog via `log.stream =`. Defaults to `process.stderr` just like npmlog.

Cheers!