-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Changing default options for util.inspect #7566
Labels
console
Issues and PRs related to the console subsystem.
feature request
Issues that request new features to be added to Node.js.
util
Issues and PRs related to the built-in util module.
Comments
silverwind
added
util
Issues and PRs related to the built-in util module.
feature request
Issues that request new features to be added to Node.js.
console
Issues and PRs related to the console subsystem.
labels
Jul 6, 2016
I think at that point, you should just consider using your own logging function everywhere. |
Having some mechanism by which to modify the defaults here makes sense, but I'm not sure we could get consensus around it. An alternate logging function (or monkeypatch for |
Let's see how it goes. Filed #8013. |
silverwind
added a commit
to silverwind/node
that referenced
this issue
Aug 9, 2016
Adds util.inspect.defaultOptions which allows customization of the default util.inspect options, which is useful for functions like console.log or util.format which implicitly call into util.inspect. PR-URL: nodejs#8013 Fixes: nodejs#7566 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
silverwind
added a commit
that referenced
this issue
Aug 9, 2016
Adds util.inspect.defaultOptions which allows customization of the default util.inspect options, which is useful for functions like console.log or util.format which implicitly call into util.inspect. PR-URL: #8013 Fixes: #7566 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
cjihrig
pushed a commit
that referenced
this issue
Aug 10, 2016
Adds util.inspect.defaultOptions which allows customization of the default util.inspect options, which is useful for functions like console.log or util.format which implicitly call into util.inspect. PR-URL: #8013 Fixes: #7566 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
console
Issues and PRs related to the console subsystem.
feature request
Issues that request new features to be added to Node.js.
util
Issues and PRs related to the built-in util module.
console.log
and relatives useutil.inspect
to stringify complex structures, which creates somewhat of a dilemma when you have an application making use of bareconsole
functions but you'd like unrestricted nesting (depth: null
) or more than 100 visible array elements (maxArrayLength: null
) by default.To change the default, I could see
util.inspect.setup(opts)
being made available. Anyone with me?The text was updated successfully, but these errors were encountered: