winstonjs / logform

An mutable object format designed for chaining & objectMode streams
MIT License
249 stars 97 forks source link

[Feature Request]: Respect NO_COLOR environment variable #143

Open wopian opened 2 years ago

wopian commented 2 years ago

Winston outputs logs with colours when format.colorize(...) is used regardless of whether the environment it is running in wants to receive ANSI escape codes in its log output or not.

NO_COLOR (see https://no-color.org/) is a well established environment variable for checking whether to colourise output.

Moved from https://github.com/winstonjs/winston/issues/2061

maverick1872 commented 2 years ago

Thanks for moving this here! Helps us with housekeeping. If you're up for opening a PR for this we'd greatly appreciate it and I'll be happy to give it a review promptly if you request my review!