Class: Fluent::Plugin::TailInput::TailWatcher::StatWatcher
- Inherits:
-
Coolio::StatWatcher
- Object
- Coolio::StatWatcher
- Fluent::Plugin::TailInput::TailWatcher::StatWatcher
- Defined in:
- lib/fluent/plugin/in_tail.rb
Instance Method Summary collapse
-
#initialize(watcher, &callback) ⇒ StatWatcher
constructor
A new instance of StatWatcher.
- #on_change(prev, cur) ⇒ Object
Constructor Details
#initialize(watcher, &callback) ⇒ StatWatcher
Returns a new instance of StatWatcher.
570 571 572 573 574 |
# File 'lib/fluent/plugin/in_tail.rb', line 570 def initialize(watcher, &callback) @watcher = watcher @callback = callback super(watcher.path) end |
Instance Method Details
#on_change(prev, cur) ⇒ Object
576 577 578 579 580 581 582 |
# File 'lib/fluent/plugin/in_tail.rb', line 576 def on_change(prev, cur) @callback.call rescue # TODO log? @watcher.log.error $!.to_s @watcher.log.error_backtrace end |