
#!/usr/bin/env node
console.log(require('chalk').red('foo'));
bunyan's colors are printed correctly
chalk uses https://github.com/sindresorhus/supports-color to enable or disable colors.
You can pass a --color flag to force colors https://github.com/sindresorhus/supports-color/blob/master/index.js#L11
Alternatively you can enable it directly via code
#!/usr/bin/env node
var chalk = require('chalk');
chalk.enabled = true;
console.log(chalk.red('foo'));
So, iiuc, not a bunyan issue.
For those using colors.js instead of chalk, see this https://github.com/Marak/colors.js/issues/125.
I recommend having it in readme.
Most helpful comment
chalk uses https://github.com/sindresorhus/supports-color to enable or disable colors.
You can pass a
--colorflag to force colors https://github.com/sindresorhus/supports-color/blob/master/index.js#L11Alternatively you can enable it directly via code