0
down vote
favorite
I am designing the my custom log-stash filter using the ruby.This filter generates the event after certain period.I am generating the new event from the thread.Following is the my code of the thread function which is producing the event.
public
def timer_thread()
while 1
sleep(2)
keys = @dict.keys
keys.each { |key|
@dict[key][1] = @dict[key][1] - 2
if @dict[key][1] < 0
message = "No repsonse for the UE number: " + key
@dict.delete(key)
@logger.info(message)
e = LogStash::Event.new()
e.set("Notification",message)
yield e if block_given?
end
}
end
end
As you can see I am creating the new event and emitting it.But in my output I can only see the log message not my event. What is wrong? Please help me out