class Fluent::TailInput::TailWatcher::TimerWatcher

Attributes

log[RW]

Public Class Methods

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

Public Instance Methods

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