class Fluent::Plugin::NaisKeywordsFilter

Public Instance Methods

configure(conf) click to toggle source
Calls superclass method
# File lib/fluent/plugin/filter_nais_keywords.rb, line 11
def configure(conf)
  super
  @re = Regexp.new(@regex)
end
filter(tag, time, record) click to toggle source
# File lib/fluent/plugin/filter_nais_keywords.rb, line 16
def filter(tag, time, record)
  keywords = ::Nais::Log::Parser.get_keywords(record['message'].to_s+' '+record['stack_trace'].to_s, @re)
  record[@field] = keywords unless keywords.nil?
  record
end