Skip to content

console: add color support#19372

Closed
addaleax wants to merge 5 commits intonodejs:masterfrom
addaleax:console-tty-colors
Closed

console: add color support#19372
addaleax wants to merge 5 commits intonodejs:masterfrom
addaleax:console-tty-colors

Conversation

@addaleax
Copy link
Copy Markdown
Member

@addaleax addaleax commented Mar 15, 2018

  • util: introduce formatWithOptions()

    Identical to format() except that it takes an options argument
    that is passed through to inspect().

  • doc: document Console(…, ignoreErrors) option

  • console: add color support

    Add a way to tell Console instances to either always use, never use
    or auto-detect color support and inspect objects accordingly.

  • console: auto-detect color support by default

    This makes Node pretty-print objects with color by default
    when console.log()-ing them.

The last commit could be split out into a separate PR if that’s preferred.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Loading
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. semver-minor PRs that contain new features and should be released in the next minor version. util Issues and PRs related to the built-in util module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants