Method: Fluent::Plugin::CopyOutput#configure

Defined in:
lib/fluent/plugin/out_copy.rb

#configure(conf) ⇒ Object



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/fluent/plugin/out_copy.rb', line 38

def configure(conf)
  super

  @copy_proc = gen_copy_proc
  @stores.each_with_index { |store, i|
    if i == 0 && store.arg.include?('ignore_if_prev_success')
      raise Fluent::ConfigError, "ignore_if_prev_success must specify 2nd or later <store> directives"
    end
    @ignore_errors << (store.arg.include?('ignore_error'))
    @ignore_if_prev_successes << (store.arg.include?('ignore_if_prev_success'))
  }
  if @ignore_errors.uniq.size == 1 && @ignore_errors.include?(true) && !@ignore_if_prev_successes.include?(true)
    log.warn "ignore_errors are specified in all <store>, but ignore_if_prev_success is not specified. Is this intended?"
  end
end