elasticsearch/logstash — pull request #1188 by bodgit (2014-03-20 12:50:32+00:00)
Title: Make the Redis output honour codec setting

Whilst playing with the Redis output in conjunction with #1184 it turns out it ignores the codec setting and always uses JSON.

This change rejigs the codec so it now honours the setting, (this was also reported in [LOGSTASH-1544](https://logstash.jira.com/browse/LOGSTASH-1544)), I've tested both immediate and batched delivery.

However, this breaks the property that the Redis key can be dynamic. Previously the key is sprintf'd within the output ```receive``` block, but there's no way that I can see to pass that through to the ```@codec.encode``` call so that when the chosen codec calls back to the ```on_event``` block in the output you no longer have the original event object to be able to sprintf with. If that makes sense :-)