From b1701cb37d8d07474778bba32e511ab6620f8031 Mon Sep 17 00:00:00 2001 From: Ryan Ausanka-Crues Date: Sat, 22 Jan 2011 16:08:21 -0800 Subject: [PATCH] Enable 'negate' modifier for multiline filter so that you can do more complex multi-line event matching --- lib/logstash/filters/multiline.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/logstash/filters/multiline.rb b/lib/logstash/filters/multiline.rb index 4dec9f7e9..de07618d5 100644 --- a/lib/logstash/filters/multiline.rb +++ b/lib/logstash/filters/multiline.rb @@ -97,6 +97,9 @@ class LogStash::Filters::Multiline < LogStash::Filters::Base pending = @pending[key] @logger.debug(["Reg: ", typeconfig["pattern"], event.message, match]) + # Add negate option + match = match and !typeconfig["negate"] || !match and typeconfig["negate"] + case typeconfig["what"] when "previous" if match