class Fluent::TextParser::MultilineGrokParser

Public Class Methods

new() click to toggle source
Calls superclass method Fluent::TextParser::GrokParser.new
# File lib/fluent/plugin/parser_multiline_grok.rb, line 11
def initialize
  super
end

Public Instance Methods

configure(conf={}) click to toggle source
# File lib/fluent/plugin/parser_multiline_grok.rb, line 15
def configure(conf={})
  super
end
firstline?(text) click to toggle source
# File lib/fluent/plugin/parser_multiline_grok.rb, line 23
def firstline?(text)
  @multiline_start_regexp && !!@grok.multiline_start_regexp.match(text)
end
has_firstline?() click to toggle source
# File lib/fluent/plugin/parser_multiline_grok.rb, line 19
def has_firstline?
  !!@multiline_start_regexp
end
parse(text) { |time, record| ... } click to toggle source
# File lib/fluent/plugin/parser_multiline_grok.rb, line 27
def parse(text, &block)
  if block_given?
    @grok.parsers.each do |parser|
      parser.parse(text) do |time, record|
        if time and record
          yield time, record
          return
        end
      end
    end
  else
    @grok.parsers.each do |parser|
      parser.parse(text) do |time, record|
        if time and record
          return time, record
        end
      end
    end
  end
end