Merge branch 'master' of github.com:Spredzy/logstash into Spredzy-master

Conflicts:
	spec/filters/grok.rb
This commit is contained in:
Jordan Sissel 2013-04-11 15:05:45 -07:00
commit cd7c7c197a
2 changed files with 15 additions and 1 deletions

View file

@ -363,7 +363,7 @@ class LogStash::Filters::Grok < LogStash::Filters::Base
end
# Special casing to skip captures that represent the entire log message.
if fieldvalue == value and field == "@message"
if fieldvalue == value and field == "@message" and key.nil?
# Skip patterns that match the entire message
@logger.debug? and @logger.debug("Skipping capture since it matches the whole line.", :field => key)
next

View file

@ -280,4 +280,18 @@ describe LogStash::Filters::Grok do
reject { subject["@tags"] }.include?("_grokparsefailure")
end
end
describe "captures named fields even if the whole text matches" do
config <<-CONFIG
filter {
grok {
pattern => "%{DATE_EU:stimestamp}"
}
}
CONFIG
sample "2011/01/01" do
insist { subject["stimestamp"] } == "2011/01/01"
end
end
end