# File lib/fluent/parser.rb, line 35 def call(text) m = @regexp.match(text) unless m $log.warn "pattern not match: #{text.inspect}" return nil, nil end time = nil record = {} m.names.each {|name| if value = m[name] case name when "time" if @time_format time = Time.strptime(value, @time_format).to_i else time = Time.parse(value).to_i end else record[name] = value end end } time ||= Engine.now return time, record end
Generated with the Darkfish Rdoc Generator 2.