Yes, you can format the console.log() with something like this:
console.log("%cExtra Large Yellow Text with Red Background", "background: red; color: yellow; font-size: x-large");
Note the %c preceding the text in the first argument and the style specifications in the second argument. The text will look like your example.
See Google's "Styling Console Output with CSS" or FireBug's Console Documentation for more details.
The documentation links also include some other neat tricks like including object links in a console log as well.
Answer from Smern on Stack OverflowYes, you can format the console.log() with something like this:
console.log("%cExtra Large Yellow Text with Red Background", "background: red; color: yellow; font-size: x-large");
Note the %c preceding the text in the first argument and the style specifications in the second argument. The text will look like your example.
See Google's "Styling Console Output with CSS" or FireBug's Console Documentation for more details.
The documentation links also include some other neat tricks like including object links in a console log as well.
Try this:
console.log("%cThis will be formatted with blue text", "color: blue");
Quoting the docs,
You use the %c format specifier to apply custom CSS rules to any string you write to the Console with console.log() or related methods.
Source: https://developers.google.com/web/tools/chrome-devtools/console/console-write#styling_console_output_with_css
Can I control object formatting in the JavaScript snippet editor's console.log()? - Meta Stack Overflow
How do I change the output of console.log() for a class?
Can't use console.log in Lightning Web Components?
There a way to create a shortcut to print out console.log?
Videos
You can use JSON.stringify
var siUnits = [
{ symbol: "m", unit: "meter", quantity: "length"},
{ symbol: "k", unit: "kilogram", quantity: "mass"},
{ symbol: "s", unit: "second", quantity: "second"}
];
console.log(JSON.stringify(siUnits))
You could probably overload your object's toString function, but to be honest anything done is just going to muddy the example you were trying to make in your question or answer.
Furthermore, the indentation shown is the standard, and changing the current most used style just because it looks slightly different in node doesn't make much sense.
I don't think this is a change that needs to be implemented.