Skip to content

Commit

Permalink
--quiet part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
moseshll committed Aug 10, 2023
1 parent 9a0d65a commit 4447399
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/cictl/base_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ class BaseCommand < Thor
class_option :log, type: :string,
desc: "Log to <logfile> instead of STDOUT/STDERR",
banner: "<logfile>"
class_option :quiet, type: :boolean,
desc: "Suppress normal output to STDERR",
default: false

def initialize(args = [], local_options = {}, config = {})
# For creating the default CICTL logger as well as one for calling Traject
# an any other subcomponents we want to stick a custom logger into.
HathiTrust::Services.register(:logger_factory) do
LoggerFactory.new(verbose: options[:verbose], log_file: options[:log])
LoggerFactory.new(verbose: options[:verbose], log_file: options[:log], quiet: options[:quiet])
end
# Default CICTL logger
HathiTrust::Services.register(:logger) do
Expand Down

0 comments on commit 4447399

Please sign in to comment.