[oldlogstashjson] append newline to encoded json

This commit is contained in:
Brad Fritz 2013-11-20 19:49:47 -05:00
parent d07f4078cd
commit f5330f2fba

View file

@ -43,7 +43,8 @@ class LogStash::Codecs::OldLogStashJSON < LogStash::Codecs::Base
h["@fields"][field] = val
end
@on_event.call(h.to_json)
# Tack on a \n because JSON outputs 1.1.x had them.
@on_event.call(h.to_json + "\n")
end # def encode
end # class LogStash::Codecs::OldLogStashJSON