Class: HQ::Logger::MultiLogger
- Inherits:
-
Object
- Object
- HQ::Logger::MultiLogger
- Defined in:
- lib/hq/logger/multi-logger.rb
Instance Method Summary collapse
- #add_logger(logger) ⇒ Object
-
#initialize ⇒ MultiLogger
constructor
A new instance of MultiLogger.
- #output(content, stuff, prefix = "") ⇒ Object
Constructor Details
#initialize ⇒ MultiLogger
Returns a new instance of MultiLogger.
6 7 8 |
# File 'lib/hq/logger/multi-logger.rb', line 6 def initialize @loggers = [] end |
Instance Method Details
#add_logger(logger) ⇒ Object
10 11 12 |
# File 'lib/hq/logger/multi-logger.rb', line 10 def add_logger logger @loggers << logger end |
#output(content, stuff, prefix = "") ⇒ Object
14 15 16 17 18 19 |
# File 'lib/hq/logger/multi-logger.rb', line 14 def output content, stuff, prefix = "" @loggers.each do |logger| logger.output content, stuff, prefix end end |