Class: Fluent::TailInput::TailWatcher::StatWatcher
- Inherits:
-
Coolio::StatWatcher
- Object
- Coolio::StatWatcher
- Fluent::TailInput::TailWatcher::StatWatcher
- 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(path, &callback) ⇒ StatWatcher
constructor
A new instance of StatWatcher.
- #on_change(prev, cur) ⇒ Object
Constructor Details
#initialize(path, &callback) ⇒ StatWatcher
Returns a new instance of StatWatcher.
1072 1073 1074 1075 1076 |
# File 'lib/fluent/plugin/in_tail.rb', line 1072 def initialize(path, &callback) @callback = callback @log = $log super(path) end |
Instance Attribute Details
#log ⇒ Object
Returns the value of attribute log.
1078 1079 1080 |
# File 'lib/fluent/plugin/in_tail.rb', line 1078 def log @log end |
Instance Method Details
#on_change(prev, cur) ⇒ Object
1080 1081 1082 1083 1084 1085 1086 |
# File 'lib/fluent/plugin/in_tail.rb', line 1080 def on_change(prev, cur) @callback.call rescue # TODO log? @log.error $!.to_s @log.error_backtrace end |