Module: Fluent::Compat::ParserUtils
- Defined in:
- lib/fluent/compat/parser_utils.rb
Constant Summary collapse
- PARSER_PARAMS =
Fluent::PluginHelper::CompatParameters::PARSER_PARAMS
Class Method Summary collapse
Class Method Details
.convert_parser_conf(conf) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/fluent/compat/parser_utils.rb', line 24 def self.convert_parser_conf(conf) return if conf.elements(name: 'parse').first parser_params = {} PARSER_PARAMS.each do |older, newer| next unless newer if conf.has_key?(older) parser_params[newer] = conf[older] end end unless parser_params.empty? conf.elements << Fluent::Config::Element.new('parse', '', parser_params, []) end end |