class Fluent::NewTailInput::TailWatcher::StatWatcher

Public Class Methods

new(path, log, &callback) click to toggle source
Calls superclass method
# File lib/fluent/plugin/in_tail.rb, line 586
def initialize(path, log, &callback)
  @callback = callback
  @log = log
  super(path)
end

Public Instance Methods

on_change(prev, cur) click to toggle source
# File lib/fluent/plugin/in_tail.rb, line 592
def on_change(prev, cur)
  @callback.call
rescue
  # TODO log?
  @log.error $!.to_s
  @log.error_backtrace
end