unjs / consola

🐨 Elegant Console Logger for Node.js and Browser
Other
5.78k stars 165 forks source link

Filtering Logs #253

Open ineshbose opened 8 months ago

ineshbose commented 8 months ago

Describe the feature

Could it be possible that consola avoids outputting any logs based on some filter, like tag? The reporter class log function could conditionally not call writeStream if tag is included in comma-separated CONSOLA_SUPPRESS variable for eg

Inspired by https://github.com/nuxt-modules/tailwindcss/pull/732#issuecomment-1772489862

Can help with PR, but let me know what you think first and how you'd like it implemented