-
-
Notifications
You must be signed in to change notification settings - Fork 35.7k
console.error unexpectedly turns output red #53661
Copy link
Copy link
Closed
Labels
consoleIssues and PRs related to the console subsystem.Issues and PRs related to the console subsystem.
Metadata
Metadata
Assignees
Labels
consoleIssues and PRs related to the console subsystem.Issues and PRs related to the console subsystem.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Related to PR #51629
I'm a bit surprised that this landed without a link to the discussion. #40361 is a feature request, but doesn't have a real discussion around the pros/cons and how it will impact the nodejs ecosystem.
I would have rather seen color added to the formatting of Errors instead of blanket red/yellow for console.error/console.warn.
I realize that in some way, this PR makes the behavior closer to that in the browser, but browsers do not have CLI applications.
I treat console.log and console.error as separate channels. Traditionally
stdoutis used for output of the program. It contains the result to be used, thinkgrep.stderris used for diagnostics, status, and messages to the user while the application is running. Color is not implied.I would rather that this PR implemented color as a opt in vs trying to figure out how to opt out.
Originally posted by @Jason3S in #51629 (comment)