Module: ImportTools::ImportLogging::Extend

Included in:
HammerCLIImport::BaseCommand, HammerCLIImport::ImportCommand::AllCommand
Defined in:
lib/hammer_cli_import/importtools.rb

Instance Method Summary collapse

Instance Method Details

#add_logging_optionsObject



253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
# File 'lib/hammer_cli_import/importtools.rb', line 253

def add_logging_options
  # Logging options
  # quiet = go to logfile only
  # verbose = all output goes to STDOUT as well as log
  # debug = enable debug-output
  # default = no debug, only PROGRESS-and-above to STDOUT
  option ['--quiet'], :flag, 'Be silent - no output to STDOUT', :default => false
  option ['--debug'], :flag, 'Turn on debugging-information', :default => false
  option ['--verbose'],
         :flag,
         'Be noisy - everything goes to STDOUT and to a logfile',
         :default => false
  option ['--logfile'],
         'LOGFILE',
         'Where output is logged to',
         :default => File.expand_path('~/import.log')
end