Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI --quiet flag #2

Closed
matl33t opened this issue Jun 21, 2016 · 5 comments
Closed

CLI --quiet flag #2

matl33t opened this issue Jun 21, 2016 · 5 comments

Comments

@matl33t
Copy link
Contributor

matl33t commented Jun 21, 2016

By default, debug logs are printed out, but would be nice to have a quiet flag or loglevel option to pass in.

@apurvis
Copy link
Contributor

apurvis commented Jan 31, 2017

i think this is a non issue? if you want quieter logs just do this:

my_logger = Logger.new(STDOUT)
my_logger.level =  Logger::WARN

Broadside.configure do |config|
  config.logger = my_logger
end

i have concluded that in general people should just configure the logger they want and pass it into whatever gem or library is in use, and not try to configure the logger with bespoke config options.

i think we should close this.

@matl33t
Copy link
Contributor Author

matl33t commented Jan 31, 2017

CLI tools generally offer loglevel options to fit different use cases. Also, we may want to force the GLI_DEBUG env var during a loglevel debug but keep it absent during info

@apurvis
Copy link
Contributor

apurvis commented Jan 31, 2017

just seems like in this case you always have to write ruby code to configure your application, so it's not a lot to ask the user to set up their own Logger with whatever formatting and level they want. not a big deal though.

@matl33t
Copy link
Contributor Author

matl33t commented Jan 31, 2017

even so, in our use case we're calling broadside from both the command-line and as part of a script that samson runs. I could see a situation where the same app might require different log levels, depending if the deploy command is used as part of a script or if the status/ssh/bash command is used on CLI

@apurvis
Copy link
Contributor

apurvis commented Feb 1, 2017

i guess what i could see being maybe useful would be if you could pass --log-level through GLI itself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants