Class: LogStash::Inputs::logQueue

Inherits:
Base
  • Object
show all
Defined in:
lib/logstash/inputs/logQueue.rb

Overview

Generate a repeating message.

This plugin is intented only as an logQueue.

Instance Method Summary collapse

Instance Method Details

#registerObject



26
27
28
# File 'lib/logstash/inputs/logQueue.rb', line 26

def register
  @host = Socket.gethostname
end

#run(queue) ⇒ Object

def register



30
31
32
33
34
35
36
37
38
# File 'lib/logstash/inputs/logQueue.rb', line 30

def run(queue)
  # we can abort the loop if stop? becomes true
  while !stop?
    event = LogStash::Event.new("message" => @message, "host" => @host)
    decorate(event)
    queue << event
    Stud.stoppable_sleep(@interval) { stop? }
  end # loop
end

#stopObject

def run



40
41
# File 'lib/logstash/inputs/logQueue.rb', line 40

def stop
end