title: Logstash File plugin custom delimiter
body: <p>I'm using logstash for quite a time. I tried using a custom delimiter in File plugin. I'm reading a static file. I see file plugin extracts 32KB data and passes it to tokenizer for splitting by delimiter.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code> data = watched_file.file_read(32768)
   changed = true
   watched_file.buffer_extract(data).each do |line|
     listener.accept(line)
   @sincedb[watched_file.inode] += (line.bytesize + @delimiter_byte_size)
   end</code></pre>
  </div>
  </div>
  </p>
  
  <p>What happens when the last byte is not new line ( ie: part of a line ). My regex fails on the partial line and skips that. I lose an event in this case. I have seen this on a custom delimiter which can happen on \n delimiter as well.
  Please enlighten me. </p>