Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not warn that directories are unreadable in the in_tail plugin. #1540

Merged
merged 3 commits into from
Apr 12, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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