mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
- Add all patterns found
This commit is contained in:
parent
ec2ae60d83
commit
2953457843
1 changed files with 3 additions and 2 deletions
|
@ -15,8 +15,9 @@ class LogStash::Filters::Grok < LogStash::Filters::Base
|
|||
@config.each do |type, typeconfig|
|
||||
@logger.debug("Registering type with grok: #{type}")
|
||||
pile = Grok::Pile.new
|
||||
pile.add_patterns_from_file("patterns/grok-patterns")
|
||||
pile.add_patterns_from_file("patterns/linux-syslog")
|
||||
Dir.glob("patterns/*").each do |path|
|
||||
pile.add_patterns_from_file(path)
|
||||
end
|
||||
typeconfig["patterns"].each do |pattern|
|
||||
groks = pile.compile(pattern)
|
||||
@logger.debug(["Compiled pattern", pattern, groks[-1].expanded_pattern])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue