Class: LogStash::Outputs::Redis

Inherits:
Base
  • Object
show all
Defined in:
lib/logstash/outputs/redis-increment.rb

Overview

An redis output that does nothing.

Instance Method Summary collapse

Instance Method Details

#receive(event) ⇒ Object



40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/logstash/outputs/redis-increment.rb', line 40

def receive(event)
  begin
    @codec.encode(event)
  rescue LocalJumpError
    # This LocalJumpError rescue clause is required to test for regressions
    # for https://github.com/logstash-plugins/logstash-output-redis/issues/26
    # see specs. Without it the LocalJumpError is rescued by the StandardError
    raise
  rescue StandardError => e
    @logger.warn("Error encoding event", :exception => e,
                 :event => event)
  end
end

#registerObject



33
34
35
36
37
# File 'lib/logstash/outputs/redis-increment.rb', line 33

def register
  require "redis"
  @redis = nil
  @codec.on_event(&method(:send_to_redis))
end