Class: LSync::TeeLogger
- Inherits:
-
Object
- Object
- LSync::TeeLogger
- Includes:
- TeeHelper
- Defined in:
- lib/lsync/tee_logger.rb
Overview
The tee logger provides a simple split logging system where multiple logs may receive the same messages. These logs can route messages to different destinations using different formatting.
Instance Attribute Summary collapse
-
#loggers ⇒ Object
readonly
Returns the value of attribute loggers.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*loggers) ⇒ TeeLogger
constructor
A new instance of TeeLogger.
Methods included from TeeHelper
Constructor Details
#initialize(*loggers) ⇒ TeeLogger
Returns a new instance of TeeLogger.
13 14 15 |
# File 'lib/lsync/tee_logger.rb', line 13 def initialize(*loggers) @loggers = Set.new(loggers.flatten.compact) end |
Instance Attribute Details
#loggers ⇒ Object (readonly)
Returns the value of attribute loggers.
17 18 19 |
# File 'lib/lsync/tee_logger.rb', line 17 def loggers @loggers end |
Class Method Details
.logger_methods ⇒ Object
19 20 21 |
# File 'lib/lsync/tee_logger.rb', line 19 def self.logger_methods Set.new(Logger.instance_methods) - Set.new(Object.instance_methods + %w(tee)) end |