Class: Rforward::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/rforward.rb

Instance Method Summary collapse

Instance Method Details

#create_configObject



28
29
30
31
32
# File 'lib/rforward.rb', line 28

def create_config
  Config.instance.create_sample_config config_path
rescue ConfigNotFoundEx => e
  RLogger.instance.error e.message
end

#process_logs(path, ext = ".log") ⇒ Object



18
19
20
21
22
23
24
25
# File 'lib/rforward.rb', line 18

def process_logs path, ext=".log"
  check_config
  dependencies
  DirectoryProcessor.call path, ext
  RLogger.instance.info "#{path} logs extensions #{ext}"
rescue ConfigNotFoundEx => e
  RLogger.instance.error e.message
end