Skip to content

Commit

Permalink
in_tail: Add a warning message on retrying to open an unaccecible file
Browse files Browse the repository at this point in the history
When a fluentd proccess doesn't have permision to read a file, it should
retries to open it with a warning message. But the current
implementation suppresses the message due to #3378.
This patch revive the warning message.

Signed-off-by: Takuro Ashie <ashie@clear-code.com>
  • Loading branch information
ashie committed Jul 30, 2021
1 parent 7671d77 commit 5becea9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/fluent/plugin/in_tail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,10 @@ def open
rescue RangeError
io.close if io
raise WatcherSetupError, "seek error with #{@path}: file position = #{@watcher.pe.read_pos.to_s(16)}, reading bytesize = #{@fifo.bytesize.to_s(16)}"
rescue Errno::ENOENT, Errno::EACCES
rescue Errno::EACCES => e
@log.warn "#{e}"
nil
rescue Errno::ENOENT
nil
end

Expand Down

0 comments on commit 5becea9

Please sign in to comment.