Skip to content

Commit

Permalink
parser_json: use JSON as fallback parser instead of Yajl for performance
Browse files Browse the repository at this point in the history
Signed-off-by: Shizuo Fujita <[email protected]>
  • Loading branch information
Watson1978 committed Jan 31, 2025
1 parent 24f08be commit 2078284
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/fluent/plugin/parser_json.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ def configure_json_parser(name)
when :oj
return [Oj.method(:load), Oj::ParseError] if Fluent::OjOptions.available?

log&.info "Oj is not installed, and failing back to Yajl for json parser"
configure_json_parser(:yajl)
log&.info "Oj is not installed, and failing back to JSON for json parser"
configure_json_parser(:json)
when :json then [JSON.method(:load), JSON::ParserError]
when :yajl then [Yajl.method(:load), Yajl::ParseError]
else
Expand Down

0 comments on commit 2078284

Please sign in to comment.