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 committed Apr 19, 2017
1 parent 518a50f commit ba636ac
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 @@ -157,14 +157,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 ba636ac

Please sign in to comment.