188 Commits

Author SHA1 Message Date
Nathan Rajlich
c8aa92be6d Merge pull request #122 from seegno/enhancement/multiple-wildcards
Add support for multiple wildcards in namespaces
2014-07-08 07:34:29 -07:00
Tiago Ribeiro
d92fe0e6e0 Add support for multiple wildcards in namespaces 2014-07-08 12:02:38 +01:00
Nathan Rajlich
2f70264aad browser: fix lint 2014-06-16 17:24:54 -07:00
Nathan Rajlich
46939bcc1a Release 1.0.2 1.0.2 2014-06-10 17:50:47 -07:00
Nathan Rajlich
558f604f07 dist: recompile 2014-06-10 15:03:40 -07:00
Nathan Rajlich
abe20e18a8 Merge pull request #113 from gscottolson/master
Updated color palette for white backgrounds.
2014-06-10 14:20:38 -07:00
G Scott Olson
d738362777 Restore color order. 2014-06-10 17:17:41 -04:00
G Scott Olson
5f54356b6d Update color palette. 2014-06-10 16:57:20 -04:00
Nathan Rajlich
57f1cf2f30 History: consistent spacing 2014-06-09 11:26:47 -07:00
Nathan Rajlich
68e8139416 Merge pull request #108 from timoxley/console_error
Make console.x configurable.
2014-06-07 23:53:05 -07:00
Tim Oxley
dd32a4c902 Make console logging function configurable.
Split log() into 2 methods: formatArgs() and log(), allowing log to be
overridden on a per-namespace or global level. Global log settings trump
per-namespace settings.
2014-06-07 23:34:39 -07:00
Nathan Rajlich
83f38e56ac node: fix %o colors on old node <= 0.8.x 2014-06-07 23:15:10 -07:00
Nathan Rajlich
bd0aa4707e Merge pull request #109 from timoxley/node_path
Find node path using shell/which.
2014-06-07 22:26:09 -07:00
Tim Oxley
72793beb32 Find node path using shell/which.
Without this patch, Make would fail with the following error:

```
> make
/bin/sh: node: command not found
make: *** [node_modules] Error 127
```
This may be something strange about my computer's configuration, but
seems like a harmless change.
2014-06-07 22:21:43 -07:00
Nathan Rajlich
613065a9b4 dist: recompile 2014-06-06 13:34:35 -07:00
Nathan Rajlich
febc3fe5f5 Release 1.0.1 1.0.1 2014-06-06 13:22:45 -07:00
Nathan Rajlich
c1b0c6e9cc browser: use removeItem() to clear localStorage 2014-06-06 13:08:59 -07:00
Nathan Rajlich
462c3b2045 Merge pull request #107 from leedm777/fix-debug-env
Don't set DEBUG if namespaces is undefined.
2014-06-06 13:04:31 -07:00
David M. Lee
3aa365ae93 Don't set DEBUG if namespaces is undefined.
On Node.js, if you set a process.env field to either null or undefined,
it gets cast to string 'null' or 'undefined'.

For debug, this means that if you don't have DEBUG set, it will get set
to the string 'undefined'. There are other modules (like
node-rest-client) which use the DEBUG environment variable that will
start spewing debug output when you don't want it to.
2014-06-06 15:01:50 -05:00
Nathan Rajlich
a4de5389c0 package: add "contributors" section
Feel free to add yourself in a PR if you've contributed a patch
in the past.
2014-06-05 00:36:36 -07:00
Nathan Rajlich
9fdd3313be node: type comment typo 2014-06-05 00:35:26 -07:00
TJ Holowaychuk
4a78aa6c21 authors 2014-06-04 21:02:49 -07:00
Nathan Rajlich
908062b7b2 Release 1.0.0 1.0.0 2014-06-04 20:56:43 -07:00
Nathan Rajlich
91daf2860d dist: recompile 2014-06-02 11:41:49 -07:00
Nathan Rajlich
872115d10a make ms diff be global, not be scope
Closes #88.
Closes #90.
2014-06-02 11:36:49 -07:00
Nathan Rajlich
4ddbb61abd debug: ignore empty strings in enable()
Stops the unnecessary /^$/ regexp from being "enabled".
2014-06-01 14:27:13 -07:00
Nathan Rajlich
48114629b4 node: fix typo and optimize useColors() logic 2014-06-01 14:21:26 -07:00
Nathan Rajlich
e0b6b07cb6 node: make DEBUG_COLORS able to disable coloring
Fixes #59.
2014-06-01 11:09:55 -07:00
Nathan Rajlich
7df6b473ca example: fix "browser.html" example
To use new browserify standalone build
2014-06-01 10:41:09 -07:00
Nathan Rajlich
4501edeac6 dist: recompile 2014-06-01 10:39:37 -07:00
Nathan Rajlich
e502a7df95 *: export the colors array
DRYs up some of the logic in the process,
since the "core" color handling code gets
moved to `debug.js`

Closes #20.
2014-06-01 10:32:30 -07:00
Nathan Rajlich
9b5e9f7ef2 browser: even more robust "%c" handling
Now we support the user passing in their own
"%c" fields in `debug()` calls.
2014-06-01 10:26:58 -07:00
TJ Holowaychuk
9a282f9a41 Merge pull request #101 from visionmedia/use/browserify
Use "browserify" for standalone browser-side builds
2014-05-31 20:13:12 -07:00
Nathan Rajlich
808c5865b9 dist: recompile 2014-05-31 20:12:31 -07:00
Nathan Rajlich
43b0d51c21 npmignore: don't publish the dist dir
Not used in node/browserify, so not needed.
2014-05-31 20:12:31 -07:00
Nathan Rajlich
0c1a90a278 Makefile: refactor to use browserify
Uses browserify to build a `dist/debug.js` file for
standalone browser-side consumption.
2014-05-31 20:12:31 -07:00
Nathan Rajlich
44e6af18d3 package: add "browserify" as a dev dependency 2014-05-31 20:12:31 -07:00
Nathan Rajlich
533406869c debug: fix passing an Error object in directly 2014-05-31 20:12:17 -07:00
Nathan Rajlich
182505d365 Readme: add Web Inspector Colors section 2014-05-31 19:58:45 -07:00
Nathan Rajlich
9e4e0fff23 node: reset terminal color for the debug content
This is a controversial change as well, but it seems to be
wanted by the community, and usability is more important to me
than looks, so why not…

Closes #47.
Closes #52.
Closes #87.
2014-05-31 19:21:53 -07:00
Nathan Rajlich
32b0bf41eb browser, node: rename c to color
More clear for the user to override it this way.
See: #95
2014-05-31 19:18:41 -07:00
Nathan Rajlich
40abfe54e8 Merge pull request #100 from visionmedia/update/add-custom-formatters
Add custom "%n" formatters
2014-05-31 19:11:56 -07:00
Nathan Rajlich
652feca774 debug: remove hacky placeholder logic
@visionmedia pointed out that it is not necessary, which is
good because it was very hacky.
2014-05-31 18:57:30 -07:00
TJ Holowaychuk
ddd483df25 Merge pull request #99 from visionmedia/update/use-ms
debug: use "ms" module for humanizing the diff
2014-05-31 15:53:13 -07:00
Nathan Rajlich
b38496e03b node: map "%o" to util.inspect() 2014-05-31 14:24:59 -07:00
Nathan Rajlich
84951941a8 browser: map "%j" to JSON.stringify() 2014-05-31 14:24:43 -07:00
Nathan Rajlich
7a3f318cb6 debug: add custom "formatters"
So that the browser, node, and possibly the end users can
define their own "%n" formatters for the "format" argument
while using debug.
2014-05-31 14:23:18 -07:00
Nathan Rajlich
0f61fca93f browser: don't let "%%" throw off the color insertion index 2014-05-31 14:17:21 -07:00
Nathan Rajlich
61394bf18e debug: use "ms" module for humanizing the diff
This would be the first external dependency for `debug`,
so it's slightly controversial.
2014-05-31 13:24:29 -07:00
Nathan Rajlich
a4aacbd785 browser: fix the case of passing additional arguments after the "format"
Before the "%c" CSS color value was potentially being
inserted into the wrong place in the arguments array,
which would throw the formatting off in the Console.
2014-05-31 12:55:05 -07:00