Class: Emque::Producing::Logging
- Inherits:
-
Object
- Object
- Emque::Producing::Logging
- Defined in:
- lib/emque/producing/logging.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.initialize_logger(log_target = STDOUT) ⇒ Object
6 7 8 9 10 |
# File 'lib/emque/producing/logging.rb', line 6 def self.initialize_logger(log_target = STDOUT) @logger = Logger.new(log_target) @logger.level = Logger::INFO @logger end |
.logger ⇒ Object
12 13 14 |
# File 'lib/emque/producing/logging.rb', line 12 def self.logger defined?(@logger) ? @logger : initialize_logger end |
.logger=(log) ⇒ Object
16 17 18 |
# File 'lib/emque/producing/logging.rb', line 16 def self.logger=(log) @logger = log || Logger.new("/dev/null") end |