warrensbox/terraform-switcher

How do I turn off logging?

Closed this issue · 8 comments

Since upgrading from 1.0.2 to 1.1.1 tfswitch spews all sorts of INFO level logging. I only want to see that if I enable it. How do I turn it off?

Can you show an example of too much logs please?

that last entry is because I have a hook to switch tf version based on something besides the version constraint. So I get 3 lines from tfswitch's automagic switch and then one for the switch I actually want.

@grimm26 what was working in the previous releases that has stopped working in this release?

Maybe that would help us understand what you need?

Nothing stopped working, I just have a lot of spam scrolling by on my screen when I switch versions and there doesn't seem to be a way to turn it off

So you want something like a --no-log flag or a config parameter in the TOML File that allows you to run tfswitch in silent mode. Did i understand that correctly?

So you want something like a --no-log flag or a config parameter in the TOML File that allows you to run tfswitch in silent mode.

This kind of option already exists: log-level — we only need to ensure it works as expected and tune it by adding more options to reduce logging to only Errors, Fatals, Panics I guess.

Added a --log-level=ERROR with #447