mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
- Follow symlink if pattern_dir is one
This commit is contained in:
parent
78cfbff565
commit
f35a1ea88a
1 changed files with 5 additions and 2 deletions
|
@ -25,10 +25,14 @@ module LogStash
|
|||
|
||||
super(config)
|
||||
|
||||
if not File.exists?("#{@pattern_dir}")
|
||||
if not File.exists?(@pattern_dir)
|
||||
throw StandardError.new("#{@pattern_dir} does not exist")
|
||||
end
|
||||
|
||||
if File.symlink?(@pattern_dir)
|
||||
@pattern_dir = File.readlink(@pattern_dir)
|
||||
end
|
||||
|
||||
pattern_files = []
|
||||
Find.find("#{@pattern_dir}") do |file|
|
||||
# ignore directories
|
||||
|
@ -46,7 +50,6 @@ module LogStash
|
|||
#puts "Compiling #{pattern} / #{grok}"
|
||||
grok.compile(pattern)
|
||||
#puts grok.expanded_pattern
|
||||
#puts
|
||||
@groks << grok
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue