DEV Community

Discussion on: How to style console.logs in Chrome Dev Tools

Collapse
 
baenencalin profile image
Calin Baenen

Uhh, the last part of the question is confusing, so I'll cut it to "You mean you want to use multiple format specifiers?".
And to answer that: yes. I do want to use multiple.

Thread Thread
 
baenencalin profile image
Calin Baenen

Though, what if I want to revert to the default? Since I know I can (probably) use multiple %c, but I wouldn't know how to revert the %c.

Thread Thread
 
arikaturika profile image
Arika O

Please check the end of the article, I edited it to show how to use multiple format specifiers at once. As for the reversion, the format specifier only applies to one console log, so the next console log won't have styles applied.

Thread Thread
 
baenencalin profile image
Calin Baenen

I know. But what if I want to revert in the middle of my console log?

Thread Thread
 
arikaturika profile image
Arika O

Here you go: console.log("%cThis will be formatted with blue text", "color: blue", "This will not be formatted at all, even though we are inside the same console log.");