lumoslabs / broadside

Command-line tool for AWS ECS deploys

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CLI --quiet flag

matl33t opened this issue · comments

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

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.

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

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.

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

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