Add support for NO_COLOR environment variable#321
Add support for NO_COLOR environment variable#321EyLuismi wants to merge 1 commit intowinstonjs:masterfrom
Conversation
|
Hey there, thanks for this idea! In principle I have no objection. It seems like this might be a bit over-engineered though - why do we need the env manager? I.e. why not just ? I think that's the style we generally use across the winston stack for things (no separate options structs etc.) so that might be a bit more stylistically consistent here (and fewer lines of code). Let me know your thoughts though. Thanks again for your contribution! |
|
Hi! Yes, that was my first approach, but then, the test failed depending on your |
|
Hmm maybe @wbt can take a look and opine sometime on this one |
|
I've had to really focus in more on funded work, which unfortunately open-source hours like this usually isn't, making a more in-depth detailed review a bit difficult logisitically. |
As issue #143 describes,
NO_COLORis becoming an established environment variable to turn off colour output in environments that may not accept them, such as Log aggregators. More info at: https://no-color.org/This PR aims to support it by adding an Environment Variable Manager that can be passed down to the Colorizer format and helps with test mocking.