Repository navigation
Node: configurable util.inspect() options - #327
Merged
Merged
Conversation
Contributor
|
@TooTallNate can you update docs? |
Contributor
|
@TooTallNate any update on docs man? Also, we need to resolve conflicts on this. I'd like to release 2.4 this week |
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.
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.
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
TooTallNate
force-pushed
the
add/configurable-inspect-opts
branch
from
December 12, 2016 21:50
d23b07f to
b7c3370
Compare
Contributor
Author
|
Rebased + added docs. |
fengmk2
reviewed
Dec 14, 2016
| debug.namespace = namespace; | ||
| debug.enabled = exports.enabled(namespace); | ||
| debug.useColors = exports.useColors(); | ||
| debug.color = selectColor(namespae); |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Via env variables by default. So to get more object depth,
you pass the
DEBUG_DEPTH=10env var.For the
showHiddenoption, you setDEBUG_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
Fixes #316. Perhaps others.