diff --git a/lib/fluent/plugin/out_sql.rb b/lib/fluent/plugin/out_sql.rb index c039166..d86e245 100644 --- a/lib/fluent/plugin/out_sql.rb +++ b/lib/fluent/plugin/out_sql.rb @@ -99,7 +99,7 @@ def import(chunk, output) columns |= new_record.keys records << @model.new(new_record) rescue => e - args = {error: e, table: @table, record: Yajl.dump(data)} + args = {error: e, table: @table, record: JSON.generate(data)} @log.warn "Failed to create the model. Ignore a record:", args end }