If I generate 5 messages (by changing count to 5) I just get a single long line, so it is not even adding newlines:
2016-11-03T12:14:12.816Z OSTML0204389 Hello world!2016-11-03T12:14:12.837Z OSTML0204389 Hello world!2016-11-03T12:14:12.840Z OSTML0204389 Hello world!2016-11-03T12:14:12.842Z OSTML0204389 Hello world!2016-11-03T12:14:12.844Z OSTML0204389 Hello world!
As far as I can tell the logstash-output-csv plugin is not compatible with logstash 5. It defines a receive event that is never called. If I look at the how to define a logstash output plugin it uses multi_receive. The examples config I have been testing is from the output-csv unit tests. My confidence in using logstash with even its shipped plugins in production has been damaged.
From reading the code for the file ouput plugin it looks like a better way to do CSV output might be to write a new csv codec instead. I will go dig out a ruby tutorial...