Commit b12f7a93 authored by Matevz Golob's avatar Matevz Golob

Update in_bin.rb to be compatible with updates in in_tail.rb

parent 135e3948
......@@ -33,7 +33,7 @@ module Fluent::Plugin
def setup_watcher(path, pe)
line_buffer_timer_flusher = (@multiline_mode && @multiline_flush_interval) ? TailWatcher::LineBufferTimerFlusher.new(log, @multiline_flush_interval, &method(:flush_buffer)) : nil
tw = TailWatcher.new(path, @rotate_wait, pe, log, @read_from_head, @enable_watch_timer, @read_lines_limit, method(:update_watcher), line_buffer_timer_flusher, &method(:receive_lines))
tw = TailWatcher.new(path, @rotate_wait, pe, log, @read_from_head, @enable_watch_timer, @read_lines_limit, method(:update_watcher), line_buffer_timer_flusher, @from_encoding, @encoding, open_on_every_update, &method(:receive_lines))
tw.attach do |watcher|
timer_execute(:in_tail_timer_trigger, 1, &watcher.method(:on_notify)) if watcher.enable_watch_timer
event_loop_attach(watcher.stat_trigger)
......@@ -42,7 +42,8 @@ module Fluent::Plugin
end
class TailWatcher < TailInput::TailWatcher
def on_rotate(io)
def on_rotate(stat)
io = Fluent::FileWrapper.open(@path)
if @io_handler == nil
if io
# first time
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment