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


85
86
87
88
89
90
91
92
93
94
# File 'lib/fluent/plugin/fixed_parser.rb', line 85

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