- Find patterns based on relative pathing of the file

This commit is contained in:
Jordan Sissel 2010-11-18 08:27:16 -08:00
parent 3b2395f372
commit 597a89a7e8

View file

@ -15,7 +15,8 @@ class LogStash::Filters::Grok < LogStash::Filters::Base
@config.each do |type, typeconfig|
@logger.debug("Registering type with grok: #{type}")
pile = Grok::Pile.new
Dir.glob("patterns/*").each do |path|
patterndir = "#{File.dirname(__FILE__)}/../../../patterns/*"
Dir.glob(patterndir).each do |path|
pile.add_patterns_from_file(path)
end
typeconfig["patterns"].each do |pattern|