# File lib/fluent/parser.rb, line 176 def configure(conf) super @time_parser = TimeParser.new(@time_format) end
# File lib/fluent/parser.rb, line 185 def parse(text) m = @regexp.match(text) unless m if block_given? yield nil, nil return else return nil, nil end end time = nil record = {} m.names.each {|name| if value = m[name] case name when "time" time = @mutex.synchronize { @time_parser.parse(value) } else record[name] = if @type_converters.nil? value else convert_type(name, value) end end end } if @estimate_current_event time ||= Engine.now end if block_given? yield time, record else # keep backward compatibility. will be removed at v1 return time, record end end
Generated with the Darkfish Rdoc Generator 2.