Skip to content

Commit

Permalink
Add more debug message for file check
Browse files Browse the repository at this point in the history
Signed-off-by: Masahiro Nakagawa <[email protected]>
  • Loading branch information
repeatedly committed Apr 1, 2019
1 parent 0e37e68 commit 4142a7b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/fluent/plugin/buf_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ def resume
Dir.glob(patterns) do |path|
next unless File.file?(path)

log.debug { "restoring buffer file: path = #{path}" }

m = new_metadata() # this metadata will be overwritten by resuming .meta file content
# so it should not added into @metadata_list for now
mode = Fluent::Plugin::Buffer::FileChunk.assume_chunk_state(path)
Expand Down
5 changes: 4 additions & 1 deletion lib/fluent/plugin/in_tail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ def expand_paths
false
end
rescue Errno::ENOENT
log.debug("#{p} is missing after refresh file list")
false
end
}
Expand All @@ -260,6 +261,8 @@ def refresh_watchers
target_paths = expand_paths
existence_paths = @tails.keys

log.debug { "tailing paths: target = #{target_paths.join(",")} | existing = #{existence_paths.join(",")}" }

unwatched = existence_paths - target_paths
added = target_paths - existence_paths

Expand Down Expand Up @@ -337,7 +340,7 @@ def close_watcher_handles
def update_watcher(path, pe)
if @pf
unless pe.read_inode == @pf[path].read_inode
log.trace "Skip update_watcher because watcher has been already updated by other inotify event"
log.debug "Skip update_watcher because watcher has been already updated by other inotify event"
return
end
end
Expand Down

0 comments on commit 4142a7b

Please sign in to comment.