Class: Fluent::Format::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/fluent/format/cli.rb

Instance Method Summary collapse

Instance Method Details

#check ⇒ Object



21
22
23
24
25
26
27
28
# File 'lib/fluent/format/cli.rb', line 21

def check
  config = @options[:config]
  plugin = @options[:plugin]
  Fluent::Format.check(config, plugin)
rescue => e
  $log.error "#{e.class}: #{e}"
  exit 1
end

#format ⇒ Object



10
11
12
13
14
15
16
# File 'lib/fluent/format/cli.rb', line 10

def format
  config = @options[:config]
  taputs Fluent::Format.format(config)
rescue => e
  $log.error "#{e.class}: #{e}"
  exit 1
end