switched the order of l.out and error checking, because as it is stated in the Go docs (https://golang.org/pkg/bytes/#Buffer.ReadString):     ReadString reads until the first occurrence of delim in the input, returning a string containing the data up to and including the delimiter. If ReadString encounters an error before finding a delimiter, it returns the data read before the error and the error itself (often io.EOF). ReadString returns err != nil if and only if the returned data does not end in delim.
switched the order of l.out and error checking, because as it is stated in the Go docs (https://golang.org/pkg/bytes/#Buffer.ReadString):
    ReadString reads until the first occurrence of delim in the input, returning a string containing the data up to and including the delimiter. If ReadString encounters an error before finding a delimiter, it returns the data read before the error and the error itself (often io.EOF). ReadString returns err != nil if and only if the returned data does not end in delim.

So the line can still contain information, even if an err is returned. Especially if err == io.EOF, which can happen if the last line does not end with a newline char.

kvz/logstreamer