Skip to content

Changing default options for util.inspect #7566

@silverwind

Description

@silverwind

console.log and relatives use util.inspect to stringify complex structures, which creates somewhat of a dilemma when you have an application making use of bare console 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    consoleIssues and PRs related to the console subsystem.feature requestIssues that request new features to be added to Node.js.utilIssues and PRs related to the built-in util module.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions