Class: Fluent::Plugin::NaisPrefixFilter

Inherits:
Filter
  • Object
show all
Defined in:
lib/fluent/plugin/filter_nais_prefix_fields.rb

Instance Method Summary collapse

Instance Method Details

#configure(conf) ⇒ Object



12
13
14
15
# File 'lib/fluent/plugin/filter_nais_prefix_fields.rb', line 12

def configure(conf)
  super
  @re = Regexp.new(@regex)
end

#filter(tag, time, record) ⇒ Object



17
18
19
# File 'lib/fluent/plugin/filter_nais_prefix_fields.rb', line 17

def filter(tag, time, record)
  ::Nais::Log::Parser.prefix_fields(record, @prefix, @re)
end