Class: Fluent::TailInput::TailWatcher::TimerWatcher
- Inherits:
-
Coolio::TimerWatcher
- Object
- Coolio::TimerWatcher
- Fluent::TailInput::TailWatcher::TimerWatcher
- Defined in:
- lib/fluent/plugin/in_tail.rb
Instance Attribute Summary collapse
-
#log ⇒ Object
Returns the value of attribute log.
Instance Method Summary collapse
-
#initialize(interval, repeat, &callback) ⇒ TimerWatcher
constructor
A new instance of TimerWatcher.
- #on_timer ⇒ Object
Constructor Details
#initialize(interval, repeat, &callback) ⇒ TimerWatcher
Returns a new instance of TimerWatcher.
1054 1055 1056 1057 1058 |
# File 'lib/fluent/plugin/in_tail.rb', line 1054 def initialize(interval, repeat, &callback) @callback = callback @log = $log super(interval, repeat) end |
Instance Attribute Details
#log ⇒ Object
Returns the value of attribute log.
1060 1061 1062 |
# File 'lib/fluent/plugin/in_tail.rb', line 1060 def log @log end |
Instance Method Details
#on_timer ⇒ Object
1062 1063 1064 1065 1066 1067 1068 |
# 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 |