Skip to content
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

Unable to disable Chalk coloured output #80

Open
saintberry opened this issue Nov 24, 2015 · 2 comments
Open

Unable to disable Chalk coloured output #80

saintberry opened this issue Nov 24, 2015 · 2 comments

Comments

@saintberry
Copy link

On line #12 of logger.js Chalk enabled is forced to true.

chalk.enabled = true;

This means it is not possible to turn off coloured output with flags chalk supports such as --no-colour.

Without being able to turn off coloured output, logs contain a lot of junk that is hard to pass.

If line #12 is removed, the client code would be able to determine if coloured output should be enabled or not (or Chalk would figure it out dynamically based on the TERM that is running the instance of node).

@saintberry
Copy link
Author

Might also be an idea to set morgan to use short logger in production.js. Dev format will have coloured ouput.

app.use(morgan('short'));

@teohhanhui
Copy link

Hi @saintberry, we've included your fixes in our fork: tripviss/image-resizer#14

The maintainer of this project seems to be unresponsive, and we intend to continue maintaining it so do check out our fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants