class Fluent::Plugin::TailInput::TailWatcher::StatWatcher

Public Class Methods

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

Public Instance Methods

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