Method: Fluent::Compat::TextParser#configure

Defined in:
lib/fluent/compat/parser.rb

#configure(conf, required = true) ⇒ Object



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/fluent/compat/parser.rb', line 58

def configure(conf, required=true)
  format = conf['format']

  @parser = TextParser.lookup(format)

  if @parser.respond_to?(:configure)
    @parser.configure(conf)
  end
  if !@estimate_current_event.nil? && @parser.respond_to?(:'estimate_current_event=')
    # external code sets parser.estimate_current_event = false
    @parser.estimate_current_event = @estimate_current_event
  end

  return true
end