Skip to content

Commit

Permalink
Merge pull request #1540 from iantalarico/tail-dont-error-dirs
Browse files Browse the repository at this point in the history
Do not warn that directories are unreadable in the in_tail plugin.
  • Loading branch information
repeatedly authored Apr 12, 2017
2 parents 1dc7ff8 + a01a7e2 commit e183496
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/fluent/plugin/in_tail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,17 @@ def expand_paths
path = date.strftime(path)
if path.include?('*')
paths += Dir.glob(path).select { |p|
if File.readable?(p) && !File.directory?(p)
is_file = !File.directory?(p)
if File.readable?(p) && is_file
if @limit_recently_modified && File.mtime(p) < (date - @limit_recently_modified)
false
else
true
end
else
log.warn "#{p} unreadable. It is excluded and would be examined next time."
if is_file
log.warn "#{p} unreadable. It is excluded and would be examined next time."
end
false
end
}
Expand Down

0 comments on commit e183496

Please sign in to comment.