Class: Logging::Appenders::Redis
- Inherits:
-
Logging::Appender
- Object
- Logging::Appender
- Logging::Appenders::Redis
- Includes:
- Buffering
- Defined in:
- lib/logging/appenders/redis.rb
Overview
Provides an appender that can append log messages to a Redis list
Instance Attribute Summary collapse
-
#redis ⇒ Object
readonly
Returns the value of attribute redis.
Instance Method Summary collapse
-
#close(*_args) ⇒ Object
Close the Redis appender.
-
#initialize(name, opts = {}) ⇒ Redis
constructor
A new instance of Redis.
Constructor Details
#initialize(name, opts = {}) ⇒ Redis
Returns a new instance of Redis.
18 19 20 21 22 |
# File 'lib/logging/appenders/redis.rb', line 18 def initialize(name, opts = {}) super(name, opts) configure_buffering(opts) @redis = ::Redis.new end |
Instance Attribute Details
#redis ⇒ Object (readonly)
Returns the value of attribute redis.
16 17 18 |
# File 'lib/logging/appenders/redis.rb', line 16 def redis @redis end |
Instance Method Details
#close(*_args) ⇒ Object
Close the Redis appender.
26 27 28 |
# File 'lib/logging/appenders/redis.rb', line 26 def close(*_args) super(false) end |