image-resizer icon indicating copy to clipboard operation
image-resizer copied to clipboard

Unable to disable Chalk coloured output

Open saintberry opened this issue 9 years ago • 2 comments

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 avatar Nov 24 '15 01:11 saintberry

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'));

saintberry avatar Nov 24 '15 05:11 saintberry

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.

teohhanhui avatar Jun 28 '16 10:06 teohhanhui