* Make millisecond timer namespace specific
When debugging node apps, I find it much more useful for the
millisecond timer to be relative to last message from the same
namespace instead of any message. This is especially true when I'm
debugging across multiple libraries or multiple levels in the same
module and I'm interested in seeing all the messages but also need to
compare times from specific levels.
* Enable 'always enabled' output
Having to deal with 2 different logging mechanisms, one for debugging
and one for normal output, can be a nuisance. It would be much easier to
always use the same facility and semantics for both. This patch allows
an 'always enabled' namespace to be specified by appending a single '*'
to the namespace name.
var alwaysOn = require('debug')('normal:messages*');
alwaysOn('This will always display regardless of DEBUG');
* `formatArgs()` gets passed the args Array directly
Rather than working on `arguments`. The Node.js version
was for some reason turning the arguments into an Array
again so it was happening twice! This should make things
faster overall.
* whitespace
* rename `Readme.md` to `README.md`
* refactor the `debug()` constructor a bit
Now, debug instances are hot-enabelable. That is, you can
toggle the `debug.enabled` boolean on instances to enable
or disable an instance. There is still no global version of
this functionality.
Now all instances get a `useColors` and `colors` property,
even disabled ones, in case they get enabled later on. Boot-up
time impact should be negligible.
* node: allow configurable `util.inspect()` options
Via env variables by default. So to get more object depth,
you pass the `DEBUG_DEPTH=10` env var.
For the `showHidden` option, you set `DEBUG_SHOW_HIDDEN=on`.
See the Node.js docs for the complete list of `util.inspect()` options:
https://nodejs.org/api/util.html#util_util_inspect_object_options
* README: document inspect env variables