diff --git a/lib/fluent/plugin/parser_json.rb b/lib/fluent/plugin/parser_json.rb index 52dd6f5e8f..1a2362990e 100644 --- a/lib/fluent/plugin/parser_json.rb +++ b/lib/fluent/plugin/parser_json.rb @@ -58,14 +58,14 @@ def configure_json_parser(name) raise "BUG: unknown json parser specified: #{name}" end rescue LoadError => ex - name = :yajl if log - if /\boj\z/.match?(ex.message) + if name == :oj log.info "Oj is not installed, and failing back to Yajl for json parser" else log.warn ex.message end end + name = :yajl retry end