Module: Dalli
- Defined in:
- lib/dalli/client.rb,
lib/dalli.rb,
lib/dalli/ring.rb,
lib/dalli/server.rb,
lib/dalli/options.rb,
lib/dalli/railtie.rb,
lib/dalli/version.rb,
lib/dalli/compressor.rb
Overview
Defined Under Namespace
Modules: Threadsafe
Classes: Client, Compressor, DalliError, GzipCompressor, MarshalError, NetworkError, Railtie, Ring, RingError, Server, UnmarshalError
Constant Summary
collapse
- VERSION =
'2.6.4'
Class Method Summary
collapse
Class Method Details
.default_logger ⇒ Object
31
32
33
34
35
36
|
# File 'lib/dalli.rb', line 31
def self.default_logger
require 'logger'
l = Logger.new(STDOUT)
l.level = Logger::INFO
l
end
|
.logger ⇒ Object
22
23
24
|
# File 'lib/dalli.rb', line 22
def self.logger
@logger ||= (rails_logger || default_logger)
end
|
.logger=(logger) ⇒ Object
38
39
40
|
# File 'lib/dalli.rb', line 38
def self.logger=(logger)
@logger = logger
end
|
.rails_logger ⇒ Object
26
27
28
29
|
# File 'lib/dalli.rb', line 26
def self.rails_logger
(defined?(Rails) && Rails.respond_to?(:logger) && Rails.logger) ||
(defined?(RAILS_DEFAULT_LOGGER) && RAILS_DEFAULT_LOGGER.respond_to?(:debug) && RAILS_DEFAULT_LOGGER)
end
|