Class: Cachetastic::Logger
- Inherits:
-
Object
- Object
- Cachetastic::Logger
- Defined in:
- lib/cachetastic/logger.rb
Overview
This class handles logging for the caches and their adapters. This class exists simply to supply the ability to write to multiple loggers simultaneously from a single call. It also creates a standardized message to write to those loggers.
It is important that any logger type of class you decide to use reponds to the following methods:
fatal()
error()
warn()
info()
debug()
Constant Summary collapse
- LOG_LEVELS =
:nodoc:
[:fatal, :error, :warn, :info, :debug]
Instance Attribute Summary collapse
-
#loggers ⇒ Object
An
Array
of ‘real’ loggers to write to.
Instance Method Summary collapse
-
#initialize(*loggers) ⇒ Logger
constructor
The
initialize
method takes anArray
of your favorite logger style classes to write to.
Constructor Details
#initialize(*loggers) ⇒ Logger
The initialize
method takes an Array
of your favorite logger style classes to write to.
21 22 23 |
# File 'lib/cachetastic/logger.rb', line 21 def initialize(*loggers) @loggers = [loggers].flatten end |
Instance Attribute Details
#loggers ⇒ Object
An Array
of ‘real’ loggers to write to.
17 18 19 |
# File 'lib/cachetastic/logger.rb', line 17 def loggers @loggers end |