exec input

This commit is contained in:
Nick Ethier 2011-08-04 12:46:41 -06:00
parent a9f1790e7f
commit 4de29e2b32

View file

@ -21,14 +21,14 @@ class LogStash::Inputs::Exec < LogStash::Inputs::Base
public
def register
#require "eventmffachine"
@logger.info(["Registering Exec Input", {:type => @type, :exec => @exec, :period => @period}])
end # def register
public
def run(queue)
while(1)
out = IO.popen(@exec)
e = to_event(out.readlines, @exec)
e = to_event(out.read, @exec)
queue << e
sleep @period
end