-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Conversation
Currently a warning will appear for directories that are globbed. They will never be reabable so the message appears on each refresh.
lib/fluent/plugin/in_tail.rb
Outdated
@@ -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_directory = File.directory?(p) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is_file = !File.directory?(p)
is better for removing every !
from is_directory
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PTAL
lib/fluent/plugin/in_tail.rb
Outdated
@@ -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_directory = File.directory?(p) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Thx! |
Do not warn that directories are unreadable in the in_tail plugin.
Currently a warning will appear for each directory in globbed results. They will never be readable so the message appears on each refresh.