-
Notifications
You must be signed in to change notification settings - Fork 447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'safe' colors not showing up when using foreman #121
Comments
For reference, this is also an issue when using grunt-express-server. // Gruntfile.js
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-express-server');
grunt.initConfig({
express: {
dev: {
options: {
script: 'index.js'
}
}
}
});
}; |
Same here with grunt-express-server. It's quite annoying since we can't have a colorized output with Winston using Grunt for example. |
+1 (grunt-express-server, wilson) |
So it looks like the problem is for non-TTY environments, But we can easily force the colors to be enabled simply by setting: var colors = require('colors');
colors.enabled = true; |
Yep, you can force colors to true (check out lib/system/supports-colors.js for additional command line args etc. you can pass to force colors to be enabled). Please feel free to re-open if this issue persists with |
When running the node app with foreman, strings colored with
colors/safe
do not display. This is an issue since Heroku uses foreman to run node apps, and so logs will not show up in color.Using the following
Procfile
:The following code produces colorized output:
but the following does not:
The text was updated successfully, but these errors were encountered: