lib/fluent/plugin/out_splunk_hec.rb in fluent-plugin-splunk-enterprise-0.9.0 vs lib/fluent/plugin/out_splunk_hec.rb in fluent-plugin-splunk-enterprise-0.9.1
- old
+ new
@@ -118,10 +118,12 @@
msg['index'] = record[@index_key]
elsif @default_index
msg['index'] = @default_index
end
- msg.to_json + "\n"
+ res = Yajl.dump(msg)
+ res << @line_breaker
+ res
end
def format_event_raw(record)
(record[@event_key] || '') + @line_breaker
end