Class: Cachetastic::Logger
- Defined in:
- lib/gems/cachetastic-2.1.2/lib/cachetastic/logger.rb
Overview
This class handles logging for the caches and their adapters.
Constant Summary collapse
- LOG_LEVELS =
[:fatal, :error, :warn, :info, :debug]
Instance Attribute Summary collapse
-
#loggers ⇒ Object
attr_accessor :options attr_accessor :cache_name.
Instance Method Summary collapse
-
#initialize(loggers) ⇒ Logger
constructor
A new instance of Logger.
Constructor Details
#initialize(loggers) ⇒ Logger
Returns a new instance of Logger.
8 9 10 11 12 13 14 15 |
# File 'lib/gems/cachetastic-2.1.2/lib/cachetastic/logger.rb', line 8 def initialize(loggers) @loggers = [loggers].flatten # self.options = options # self.cache_name = cache_name # self.options.each_pair do |n, opts| # opts["level"] = (opts["level"] ||= "info").to_sym # end end |
Instance Attribute Details
#loggers ⇒ Object
attr_accessor :options attr_accessor :cache_name
6 7 8 |
# File 'lib/gems/cachetastic-2.1.2/lib/cachetastic/logger.rb', line 6 def loggers @loggers end |