Fixes completely broken redis output

This commit is contained in:
Bob Corsaro 2011-05-26 16:56:32 -04:00
parent 70291e76a2
commit 472a8de49d

View file

@ -64,9 +64,9 @@ class LogStash::Outputs::Redis < LogStash::Outputs::Base
begin
@redis ||= connect
if @data_type == 'list'
@redis.rpush event.sprintf(@list), event.to_json if @list
@redis.rpush event.sprintf(@key), event.to_json
else
@redis.publish event.sprintf(@channel), event.to_json if @channel
@redis.publish event.sprintf(@key), event.to_json
end
rescue => e
# TODO(sissel): Be specific in the exceptions we rescue.