Module: Fluent::Config::Pit

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

Class Method Summary collapse

Class Method Details

.extract(conf) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'lib/fluent/plugin/pit.rb', line 4

def self.extract(conf)
  pit = Pit.get(conf.arg)
  ex = Fluent::Config::Element.new('', '', conf, [])
  ex.each do |k, v|
    if v =~ /^\$pit\[(.+)\]$/
      ex[k] = pit[$1]
    end
  end
  return ex
end