9 Commits

Author SHA1 Message Date
Nathan Rajlich
25e07c78fc don't call splice() when indexOf() returns -1 2017-08-08 14:42:25 -07:00
Nathan Rajlich
02eb3c607e fix lint 2017-08-08 14:42:25 -07:00
Nathan Rajlich
bf88540737 enabled() updates existing debug instances, add destroy() function (#440)
* dynamically updatable instances

* add a `destroy()` function to debug instances

So that "dynamically created instances" can clean up after themselves
2017-08-08 14:42:25 -07:00
George Joseph
9d7c997992 Make millisecond timer namespace specific and allow 'always enabled' output (#408)
* 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');
2017-08-08 14:42:25 -07:00
Lucian Buzzo
1f01b70f88 Fix bug that would occure if process.env.DEBUG is a non-string value. (#444)
Connects to #443
2017-04-20 11:04:28 -07:00
vgoma
78ae6c9412 Fixed IE8 "Expected identifier" error 2017-01-16 22:00:27 +03:00
Mykyta Usikov
1c163a48c1 added names and skips arrays erasing on enable call (#409) 2017-01-04 13:58:28 -06:00
Yami
2a01c6c775 Merged from upstream/master. I left the dist/debug in place because my hook now updates it automatically, but I removed the babelrc file since we don't need it anymore. 2016-12-20 12:27:29 +00:00
Yami
f42b962792 refactor: Moved source files to /src. Moved test files to client and server side tests. Added karma for front-end testing. 2016-12-16 15:19:40 +00:00