josegonzalez/beaver — pull request #165 by meekmichael (2013-06-19 18:01:03+00:00)
Title: Allow string escapes in delimiter

As far as I can tell, there is no way for me to represent a newline as
a delimiter in a configuration file with ConfigParser. I want to do this:

[/ephemeral_storage/logs/kind_of_special.log]
tags: special
type: special
delimiter: \n\n

As the log has a blank line between its multiline entries.

My change allows that, by making delimiter not string-escaped until
after the config file is parsed. I'm naive about python, so there is a
strong possibility I've gone about it horribly wrong. This would also
easily allow splitting on nulls, tabs, unicode characters and other
things that ConfigParser may not find kosher.

By doing this sort of multiline parsing with beaver, it allows one to
run logstash without the multiline filter, which due to its lack of
thread-safety, forces you to run logstash with only one worker thread.