-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Description
Is your feature request related to a problem? Please describe.
Node.js: 16.8.0
Currently, console.error(err)
outputs plain text, so it doesn't bring attention when scrolling the output.
For example, Error: Server not ready
is printed as plain text here:
Describe the solution you'd like
Would be great if console.error
would produce output in red. As we can see in the screenshot, it already colors the stack trace (the lines are printed in dimmed color). Is it possible to extend coloring to print the error message in red?
Describe alternatives you've considered
One could use 3rd party packages like https://www.npmjs.com/package/colors, but it's not as convenient as having it out-of-the-box. Also, it's tricky to make it working with Error
objects.
Related SO question: https://stackoverflow.com/questions/50608313/how-to-get-node-js-console-error-and-console-warn-output-in-color