Class: MultiProcess::Logger
- Defined in:
- lib/multi_process/logger.rb
Overview
Can create pipes and multiplex pipe content to put into given IO objects e.g. multiple output from multiple processes to current stdout.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*args) ⇒ Logger
constructor
Create new logger.
Methods inherited from Receiver
Constructor Details
#initialize(*args) ⇒ Logger
Create new logger.
16 17 18 19 20 21 22 23 24 |
# File 'lib/multi_process/logger.rb', line 16 def initialize(*args) @opts = args.last.is_a?(Hash) ? args.pop : {} @out = args[0] || $stdout @err = args[1] || $stderr @colwidth = 0 super() end |
Class Method Details
.global ⇒ Object
76 77 78 |
# File 'lib/multi_process/logger.rb', line 76 def global @global ||= new $stdout, $stderr end |