Class: GEPA::Logging::CompositeLogger
- Defined in:
- lib/gepa/logging/logger.rb
Overview
Logger that fans out messages to multiple IO streams.
Instance Method Summary collapse
-
#initialize(*ios) ⇒ CompositeLogger
constructor
A new instance of CompositeLogger.
- #log(message) ⇒ Object
Constructor Details
#initialize(*ios) ⇒ CompositeLogger
Returns a new instance of CompositeLogger.
31 32 33 |
# File 'lib/gepa/logging/logger.rb', line 31 def initialize(*ios) @ios = ios.flatten end |
Instance Method Details
#log(message) ⇒ Object
35 36 37 38 39 40 |
# File 'lib/gepa/logging/logger.rb', line 35 def log() @ios.each do |io| io.puts() io.flush if io.respond_to?(:flush) end end |