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(path, log, &callback) ⇒ StatWatcher
constructor
A new instance of StatWatcher.
- #on_change(prev, cur) ⇒ Object
Constructor Details
#initialize(path, log, &callback) ⇒ StatWatcher
530 531 532 533 534 |
# File 'lib/fluent/plugin/in_tail.rb', line 530 def initialize(path, log, &callback) @callback = callback @log = log super(path) end |
Instance Method Details
#on_change(prev, cur) ⇒ Object
536 537 538 539 540 541 542 |
# File 'lib/fluent/plugin/in_tail.rb', line 536 def on_change(prev, cur) @callback.call rescue # TODO log? @log.error $!.to_s @log.error_backtrace end |