jordansissel/lumberjack — pull request #46 by semipermeable (2013-04-08 23:16:08+00:00)
Title: Make harvester survive lines longer than its buffer

Fixes Issue #33

When the buffer fills, emit whatever is there as a line. This isn't
perfect, but it allows for the harvester to maintain its low, low memory
footprint and not have to deal with more of an attack surface from bad
log lines.

I'd welcome feedback on this change and the approach - it passes what tests are there, and it's been running in a non-production environment for a little while, but I haven't really exercised it fully. It sadly pushes this otherwise simple function into the realm of spaghetti, but I don't want to refactor without some more confidence in the solution.