-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Colorize console.error output to make it distinguishable #40361
Comments
There has been no activity on this feature request for 5 months and it is unlikely to be implemented. It will be closed 6 months after the last non-automated comment. For more information on how the project manages feature requests, please consult the feature request management document. |
console.log outputs in color in visual studio code and supports %c. Having the same capability when writing to the console would be consistent and invaluable. |
There has been no activity on this feature request for 5 months and it is unlikely to be implemented. It will be closed 6 months after the last non-automated comment. For more information on how the project manages feature requests, please consult the feature request management document. |
Still actual for node 19.0.0 |
There has been no activity on this feature request for 5 months and it is unlikely to be implemented. It will be closed 6 months after the last non-automated comment. For more information on how the project manages feature requests, please consult the feature request management document. |
The lack of feedback from either maintainers or users suggests there's not demand for this feature. I'll go ahead and close out the issue. |
@bnoordhuis this is something that'd like to see implemented in nodejs, right now the solutions I've tried (including the one I've made) either don't do exactly what I want to do or don't work (eg loosing stack traces). Looking at the PR, it seems that it's ready for review? |
pls different color for console.log, console.debug, console.warn and console.error. perhaps blue for debug, yellow for warn and red for error. would make development way nicer! |
I would also love to have colors on console.error and console.warn please. In browsers devtools, these methods have differents colors... |
Completed by #51629 |
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
The text was updated successfully, but these errors were encountered: