Closed ORESoftware closed 6 years ago
+1 I'd like this.
Piping colors.js output through bunyan causes the
if (process.stdout && !process.stdout.isTTY) {
return false;
}
condition in supports-color.js
to return false, making colors.supportsColor
and colors.enabled
both false.
One ugly fix is to monkey-patch colors as soon as it's required.
var colors = require("colors")
colors.enabled = true
Another one is to pass --color
or --color=true
or --color=always
(a little flamboyant, lol), as argv.
Hope it helps.
Does colors.enabled work better with bunyan using colors@next
? Feel free to open a PR if you have any specific changes that would improve integration here.
Closing this for now due to lack of activity. Thanks!
Is there an official way to use NPM colors with NPM Bunyan?
https://www.npmjs.com/package/bunyan