Class: FluentExt::TextParser::JSONParser

Inherits:
GenericParser show all
Defined in:
lib/fluent/plugin/fixed_parser.rb

Instance Method Summary collapse

Methods inherited from GenericParser

#parse_time

Instance Method Details

#call(text) ⇒ Object



73
74
75
76
77
78
79
80
81
82
# File 'lib/fluent/plugin/fixed_parser.rb', line 73

def call(text)
  record = Yajl.load(text)
  return parse_time(record)
rescue Yajl::ParseError
  unless @suppress_parse_error_log
    $log.warn "pattern not match(json): #{text.inspect}: #{$!}"
  end

  return nil, nil
end