I’d like to make use of this nifty npm colors package when printing to the server side console while running my meteor server.
I’m generating quite a bit of fixture data that I’d like to be able to color code to make it easier to read in the console.
I’ve tried both:
import colors from 'colors/safe'
console.log(colors.red("Generating Fake Data:"))
and
import colors from 'colors'
console.log("Generating Fake Data:".red)
but my console output remains to be:
I20160812-19:55:00.427(-4)? Generating Fake Data:
That first part “I20160812-19:55:00.427(-4)?
” is blue, while “Generating Fake Data:
” is just gray.
So, does anyone know another way I can display colors in my server-side console.log()
s in Meteor?
I asked this question on StackOverflow a long long time ago and thought to ask it here maybe.