Skip to content

Commit

Permalink
Fix stat_watcher wrong path
Browse files Browse the repository at this point in the history
  • Loading branch information
majimenez-stratio committed Oct 31, 2021
1 parent daf2f16 commit 7eea460
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/fluent/plugin/in_tail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def refresh_watchers
target_paths_hash = expand_paths
existence_paths_hash = existence_path

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

unwatched_hash = existence_paths_hash.reject {|key, value| target_paths_hash.key?(key)}
added_hash = target_paths_hash.reject {|key, value| existence_paths_hash.key?(key)}
Expand All @@ -389,7 +389,7 @@ def setup_watcher(target_info, pe)
end

if @enable_stat_watcher
tt = StatWatcher.new(path, log) { tw.on_notify }
tt = StatWatcher.new(target_info.path, log) { tw.on_notify }
tw.register_watcher(tt)
end

Expand Down

0 comments on commit 7eea460

Please sign in to comment.