It could be nice to be able to handle output manually instead of it going to stderr all the time. Example:
var debug = require('debug');
// Manually handle debug output. After this there are no output to stderr.
console.log(message.name, message.time, message.text);
i found stderr output odd anyways, what's the reason that isn't sent to stdout?
yea might as well be stdout, it's just sort of an old unix hack to make sure you can separate the two easily but pretty unnecessary here +1
Just to clarify, I think my use case is more broad than just changing stderr to stdout. The idea is that you can overwrite where the output goes.
im not concerned about that part personally, debug isn't really meant to be enabled in production, but passing an optional stream would be fine
If you could parse any object that implements the write method (including writable streams like process.stdout and .stderr), I would love that.
+1 for the the .to(...) pattern.
At this point you can override debug.log with a custom function. Does that work out for your use-case?
Definitely handled at this point by @timoxley in #108. Closing.