elasticsearch/logstash-forwarder — pull request #164 by tzahari (2014-02-17 10:19:30+00:00)
Title: Bugfix for log lines without or delayed newlines results in a file truncated detection and reading the file again

Changed the file reading from ReadLine() to ReadBytes('\n').
Now the file is not longer recognized as truncated (and start reading the file again from the beginning).
Details here: https://github.com/elasticsearch/logstash-forwarder/issues/149

The problem is that ReadLine() http://golang.org/pkg/bufio/#Reader.ReadLine returns also a incomplete line (without newline) but there is no indicator that the newline is missing.
Therefor I changed the reading to ReadBytes() http://golang.org/pkg/bufio/#Reader.ReadBytes