Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node: configurable util.inspect() options #327

Merged
merged 6 commits into from
Dec 12, 2016

Conversation

TooTallNate
Copy link
Contributor

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

Fixes #316. Perhaps others.

@thebigredgeek
Copy link
Contributor

@TooTallNate can you update docs?

@thebigredgeek thebigredgeek added change-patch This proposes or provides a change that requires a patch release needs-documentation This issue or change requires additional documentation feature This proposes or provides a feature or enhancement change-minor This proposes or provides a change that requires a minor release and removed change-patch This proposes or provides a change that requires a patch release labels Nov 14, 2016
@thebigredgeek thebigredgeek added this to the 2.4.0 milestone Nov 14, 2016
@thebigredgeek
Copy link
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 TooTallNate force-pushed the add/configurable-inspect-opts branch from d23b07f to b7c3370 Compare December 12, 2016 21:50
@TooTallNate
Copy link
Contributor Author

Rebased + added docs.

@thebigredgeek thebigredgeek merged commit e58d54b into master Dec 12, 2016
@thebigredgeek thebigredgeek deleted the add/configurable-inspect-opts branch December 12, 2016 23:13
debug.namespace = namespace;
debug.enabled = exports.enabled(namespace);
debug.useColors = exports.useColors();
debug.color = selectColor(namespae);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

namespae typo here!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change-minor This proposes or provides a change that requires a minor release feature This proposes or provides a feature or enhancement needs-documentation This issue or change requires additional documentation
Development

Successfully merging this pull request may close these issues.

3 participants