Sha256: edd308c35b40c71afcc31e964589e4596a199f895cbb0a4ecd044a7963e3bdfc
Contents?: true
Size: 679 Bytes
Versions: 11
Compression:
Stored size: 679 Bytes
Contents
require "logstash/outputs/base" class LogStash::Outputs::Internal < LogStash::Outputs::Base def initialize(url, config={}, &block) super @callback = block end def register @logger.info("Registering output #{@url}") end # def register def receive(event) if !@callback @logger.error("No callback for output #{@url}, cannot receive") return end @callback.call(event) end # def event # Set the callback by passing a block of code def callback(&block) @callback = block end # Set the callback by passing a proc object def callback=(proc_block) @callback = proc_block end end # class LogStash::Outputs::Internal
Version data entries
11 entries across 11 versions & 1 rubygems