class LogStash::Outputs::Internal
Public Class Methods
new(url, config={}, &block)
click to toggle source
Calls superclass method
LogStash::Outputs::Base::new
# File lib/logstash/outputs/internal.rb, line 6 def initialize(url, config={}, &block) super @callback = block end
Public Instance Methods
callback(&block)
click to toggle source
Set the callback by passing a block of code
# File lib/logstash/outputs/internal.rb, line 27 def callback(&block) @callback = block end
callback=(proc_block)
click to toggle source
Set the callback by passing a proc object
# File lib/logstash/outputs/internal.rb, line 33 def callback=(proc_block) @callback = proc_block end
receive(event)
click to toggle source
# File lib/logstash/outputs/internal.rb, line 17 def receive(event) if !@callback @logger.error("No callback for output #{@url}, cannot receive") return end @callback.call(event) end
register()
click to toggle source
# File lib/logstash/outputs/internal.rb, line 12 def register @logger.info("Registering output #{@url}") end