First, CD into your logstash directory and ensure that version 1.0.0 of the CSV Codec is installed:
bin/logstash-plugin install logstash-codec-csv --version 1.0.0
Next, save this patch to local disk logstash-codec-csv.auto-flush-on-evict.patch
, and apply it:
patch --strip=1 --directory vendor/bundle/jruby/2.5.0/gems/logstash-codec-csv-1.0.0 < logstash-codec-csv.auto-flush-on-evict.patch
You should see output indicating success:
patching file lib/logstash/codecs/csv.rb
Hunk #1 succeeded at 138 (offset 5 lines).
The IdentityMapCodec used by the File and Lumberjack inputs no longer reuses codecs across identities as of v3.1.1 of the Multiline Codec (it lives there for historical reasons, as the Multiline Codec was the protogen for stateful codecs).
If you update the multiline codec in the usual way, the patch in this gist is no longer necessary: