lib/splash/cli/logs.rb in prometheus-splash-0.5.0 vs lib/splash/cli/logs.rb in prometheus-splash-0.5.2

- old
+ new

@@ -2,16 +2,17 @@ module CLISplash class Logs < Thor include Splash::Config include Splash::Exiter + include Splash::Logs desc "analyse", "analyze logs in config" def analyse log = get_logger - results = Splash::LogScanner::new + results = LogScanner::new res = results.analyse log.info "SPlash Configured logs status :" full_status = true results.output.each do |result| if result[:status] == :clean then @@ -40,11 +41,11 @@ desc "monitor", "monitor logs in config" def monitor log = get_logger log.level = :fatal if options[:quiet] - result = Splash::LogScanner::new + result = LogScanner::new result.analyse splash_exit result.notify end @@ -65,10 +66,10 @@ desc "list", "Show configured logs monitoring" long_desc <<-LONGDESC Show configured logs monitoring\n with --detail, show logs monitor details LONGDESC - option :detail, :type => :boolean + option :detail, :type => :boolean, :aliases => "-D" def list log = get_logger log.info "Splash configured log monitoring :" log_record_set = get_config.logs log.ko 'No configured commands found' if log_record_set.empty?