linkedin / eyeglass

NPM Modules for Sass
741 stars 60 forks source link

Allow defaulting the value of verbose mode via environment variable #230

Closed chriseppstein closed 5 years ago

chriseppstein commented 5 years ago

Maybe trigger it off of DEBUG="eyeglass:results" or some other var?

rwjblue commented 5 years ago

Generally speaking the debug package or heimdall-logger "own" process.env.DEBUG. Any reason not to use those packages for this debug logging directly?

chriseppstein commented 5 years ago

@rwjblue I use the debug package for a lot of logging in eyeglass. The reason I'm using console.log directly is that I envisioned the output as more of a first class UI and not actually debugging information.

I'm not opposed to using a logger for this. It would also be good to integrate with ember-cli's ui logger when running in that context.

This issue is pretty low priority for me so I was looking to do the simplest thing for now, and checking if an env variable was set is a quick and dirty solution.

I actually have a patch for this already. Is your suggestion that I not drive this off of the DEBUG setting? I liked that DEBUG="eyeglass:*,broccoli-eyeglass:*" would enable all my debug logging and this UI as well.

gabrielcsapo commented 5 years ago

That would be great IMO, then we wouldn't have to introduce a new mechanism to control debugging

chriseppstein commented 5 years ago

Fixed by fd18a12552a66893d4ac71e2ed3b3cd904f82b06.