455 Commits

Author SHA1 Message Date
Nathan Rajlich
2c0df9baf7 rename DEBUG_HIDE_TTY_DATE to DEBUG_HIDE_DATE
The date is actually only printed when output is *NOT* a TTY.

Let's just genericize the name instead.
2017-09-26 21:11:45 +02:00
Nathan Rajlich
dcb37b2ca4 Merge branch '2.x' 2017-09-22 15:50:53 +02:00
Nathan Rajlich
56a3853b95 Add DEBUG_HIDE_TTY_DATE env var (#486)
Squashed commit of the following:

commit 62589c0a4e1babc5953ea30c7ef80b3867ed0a04
Author: Adrian Mejia <admejiar@cisco.com>
Date:   Sat Aug 12 15:24:45 2017 -0400

    solves merge conflict

commit 55e5c5e86812163293779e9bbad1afc252c83230
Author: Adrian Mejia <admejiar@cisco.com>
Date:   Sat Aug 12 15:21:16 2017 -0400

    docs

commit e09dec33c15fae136039c7ebd94c23000a35373f
Author: Adrian Mejia <admejiar@cisco.com>
Date:   Sat Aug 12 15:19:10 2017 -0400

    cleanup

commit 9dd6a2b9ca3b1f0d9852ecf0e64ccc6dacf04fa7
Author: Adrian Mejia <admejiar@cisco.com>
Date:   Sat Aug 12 15:05:53 2017 -0400

    enables DEBUG_HIDE_TTY_DATE
2017-09-22 15:45:06 +02:00
Nathan Rajlich
13abeae468 Release 2.6.9 2.6.9 2017-09-22 15:32:23 +02:00
Ya Zhuang
f53962e944 remove ReDoS regexp in %o formatter (#504) 2017-09-22 15:31:40 +02:00
Nathan Rajlich
bdb7e0137f remove "component" from package.json 2017-09-22 15:28:45 +02:00
Ya Zhuang
c38a0166c2 remove ReDoS regexp in %o formatter (#504) 2017-09-22 00:26:33 +02:00
Nathan Rajlich
47747f329f remove component.json
The project has been deprected since 2015.

We should be encouraging the community to move forward
and thus this file should be removed.
2017-09-19 00:09:40 +02:00
Nathan Rajlich
a0601e5e65 fix 2017-09-15 02:28:44 +02:00
Nathan Rajlich
e7e568a247 ignore package-lock.json 2017-09-15 00:25:50 +02:00
Mariusz Nowak
fdfa0f5f6c Fix browser detection 2017-09-13 16:02:11 +02:00
Nathan Rajlich
7cd9e539ce examples: fix colors printout
Fixes #502.
2017-09-13 15:40:33 +02:00
Josh Junon
8d76196c8e Merge pull request #496 from EdwardBetts/spelling
correct spelling mistake
2017-09-02 13:27:31 -06:00
Edward Betts
daf1a7c8c0 correct spelling mistake 2017-09-01 19:49:50 +01:00
Nathan Rajlich
3e1849d3aa Release 3.0.1 3.0.1 2017-08-24 12:44:17 -07:00
Iñaki Baz Castillo
b3ea123cc4 Disable colors in Edge and Internet Explorer (#489)
Fixes #417.
2017-08-24 12:40:18 -07:00
Nathan Rajlich
13e1d068e9 remove v3 discussion note for now 2017-08-08 15:23:50 -07:00
Nathan Rajlich
52b894cd79 Release 3.0.0 3.0.0 2017-08-08 14:55:46 -07:00
Nathan Rajlich
d2dd80aeaf component: update "ms" to v2.0.0 2017-08-08 14:49:27 -07:00
Nathan Rajlich
6752953543 fix browser test 😵 2017-08-08 14:42:25 -07:00
Nathan Rajlich
f6f6213277 remove make coveralls from travis 2017-08-08 14:42:25 -07:00
Nathan Rajlich
f178d861df attempt to separate the Node and Browser tests in Travis 2017-08-08 14:42:25 -07:00
Nathan Rajlich
d73c4aec19 fix make test 2017-08-08 14:42:25 -07:00
Nathan Rajlich
402c8567ee fix lint 2017-08-08 14:42:25 -07:00
Nathan Rajlich
87e7399fd7 readme++ 2017-08-08 14:42:25 -07:00
Nathan Rajlich
8b5c438a22 add Namespace Colors section to readme 2017-08-08 14:42:25 -07:00
Nathan Rajlich
25eb545324 more readme screenshots replaced 2017-08-08 14:42:25 -07:00
Nathan Rajlich
31f3343de7 example: use %o formatter 2017-08-08 14:42:25 -07:00
Nathan Rajlich
dfbac9c30f readme refactor 2017-08-08 14:42:25 -07:00
Nathan Rajlich
ce1a236d93 Makefile tweaks
Re-introduce `make browser` to make a standalone build of `debug.js`
for the web browser.
2017-08-08 14:42:25 -07:00
Nathan Rajlich
87880f6ae1 separate Node.js and web browser examples 2017-08-08 14:42:25 -07:00
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
5ed41f6d92 add Web Browser 256 colors
Like #481, but for the web browser.
2017-08-08 14:42:25 -07:00
Josh Junon
65192b755d use contrast-bounded colors 2017-08-08 14:42:25 -07:00
Nathan Rajlich
cefbd07bd8 update make lint 2017-08-08 14:42:25 -07:00
Nathan Rajlich
826fd94639 update "browserify" to v14.4.0 2017-08-08 14:42:25 -07:00
antoine.leveugle
39eb2770a2 Use Date#toISOString() instead to Date#toUTCString() when output is not a TTY
Easier to parse programatically and contains milliseconds.

Closes #418.
2017-08-08 14:42:25 -07:00
Josh Junon
d5854f4eb6 support 256 colors
Closes #481.
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
Nathan Rajlich
ff432e76e9 Remove DEBUG_FD (#406)
* remove DEBUG_FD

Now simply uses `process.stderr`. Breaking API change,
for the v3 branch.

Previously used internal and undocumented Node.js APIs to support
this underly used API.

Fixes #280
Closes #386

* remove DEBUG_FD from readme
2017-08-08 14:42:25 -07:00
Mattias Kindborg @FantasticFiasco
659ac0252c docs(readme): fix typo (#473) 2017-08-04 11:51:36 -07:00
Tim Ruffles
a45d4a0239 document .enabled flag (#465)
Was added in #15, should be documented (e.g #423)
2017-06-15 14:39:48 -07:00
Nathan Rajlich
52e1f21284 Release 2.6.8 2.6.8 2017-05-18 13:06:48 -07:00
Marc MacLeod
2482e08e4e Check for undefined on browser globals (#462)
* Check for undefined on browser globals.

Not all environments include these globals. For example, web workers do not have global window objects.

* remove redundant global checks
2017-05-18 09:38:54 -07:00
Andrew E. Rhyne
6bb07f7e1b release 2.6.7 2.6.7 2017-05-16 21:33:08 -07:00
Jamie
15850cb89d Fix Regular Expression Denial of Service (ReDoS)
https://snyk.io/vuln/npm:ms:20170412
2017-05-16 17:54:55 -07:00
Douglas Wilson
4a6c85c601 update "debug" to v1.0.0 (#454) 2017-05-12 16:54:37 -07:00
Mohammad Asad Siddiqui
b68dbf8cd4 Fix typo (#455)
Enables/disabled -> Enables/disabled
2017-05-12 16:54:14 -07:00