From e1018f61ca6b64ece5cff58882187c6538582dde Mon Sep 17 00:00:00 2001 From: Phil Cowans Date: Fri, 23 Mar 2012 16:21:41 +0000 Subject: [PATCH] Convert numbers to strings before running regexp --- lib/logstash/filters/grep.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/logstash/filters/grep.rb b/lib/logstash/filters/grep.rb index 065851c19fb..0f6e736d565 100644 --- a/lib/logstash/filters/grep.rb +++ b/lib/logstash/filters/grep.rb @@ -80,6 +80,7 @@ def filter(event) end (event[field].is_a?(Array) ? event[field] : [event[field]]).each do |value| + value = value.to_s if value.is_a?(Fixnum) if @negate @logger.debug("negate match", :regexp => re, :value => value) next if re.match(value)