π¨ 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](https://private-user-images.githubusercontent.com/47495003/333510776-f8a23f32-9180-4e5f-99c5-d7e6d98112ae.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE2Mzg5NDksIm5iZiI6MTcyMTYzODY0OSwicGF0aCI6Ii80NzQ5NTAwMy8zMzM1MTA3NzYtZjhhMjNmMzItOTE4MC00ZTVmLTk5YzUtZDdlNmQ5ODExMmFlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIyVDA4NTcyOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTliZTdjMDA1ZWVmNGI4YjY5MTQyYWQzMjA0YTc4NTIyYTA4ODMyOGFiNmFlMTQzY2YwMTc1NDliNmZjM2UyODYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.FymjmuYGVAGhVpnlnK7mPBJliTGezjtU7k-a2wqTkc0)
consola.info('π Utils loaded')
However, I want to colorize it like below when I use info:
(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)