unjs / consola

🐨 Elegant Console Logger for Node.js and Browser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🎨 Allow configuring consola to auto colorize the according to type

jd-solanki opened this issue Β· comments

Describe the feature

Hi πŸ‘‹πŸ»

I'm using consola in all of my project and in few of them I've to colorize the output text along with the type. For example with consola.info we'll get output like below:

image
consola.info('πŸš€ Utils loaded')

However, I want to colorize it like below when I use info:
image

(I've to write like this everywhere: consola.info(colorize('cyan', 'πŸš€ Utils loaded')))

This will be same for error, warn, success, etc

Additional information

  • Would you be willing to help implement this feature?

Good idea. We can allow this opt-in per type (pr welcome)