Class: Fluent::WinEvtLog::WindowsLogWatcher::TimerWatcher
- Inherits:
-
Coolio::TimerWatcher
- Object
- Coolio::TimerWatcher
- Fluent::WinEvtLog::WindowsLogWatcher::TimerWatcher
- Defined in:
- lib/fluent/plugin/in_winevtlog.rb
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.
200 201 202 203 |
# File 'lib/fluent/plugin/in_winevtlog.rb', line 200 def initialize(interval, repeat, &callback) @callback = callback super(interval, repeat) end |
Instance Method Details
#on_timer ⇒ Object
205 206 207 208 209 210 211 |
# File 'lib/fluent/plugin/in_winevtlog.rb', line 205 def on_timer @callback.call rescue # TODO log? $log.error $!.to_s $log.error_backtrace end |