class Fluent::Plugin::JqParser
Public Instance Methods
parse(text) { |parse_time(record), record| ... }
click to toggle source
# File lib/fluent/plugin/parser_jq.rb, line 29 def parse(text) record = jq_transform text if record.is_a?(Hash) yield parse_time(record), record else log.error "jq filter #{@jq} did not return a hash, skip this record." end rescue JqError log.error "Parse failed with #{@jq}#{log.on_debug {' on ' + text}}, error: #{$!.message}" nil end