Module: NauktisUtils::Logging

Included in:
Archiver, Duplicate, Duplicate::DeletingStrategy::BaseDeletingStrategy
Defined in:
lib/nauktis_utils/logging.rb

Overview

Logger module that can be included in classes

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.loggerObject

Global, memoized, lazy initialized instance of a logger



10
11
12
# File 'lib/nauktis_utils/logging.rb', line 10

def self.logger
  @logger ||= Logger.new(STDOUT)
end

.logger=(new_logger) ⇒ Object



14
15
16
# File 'lib/nauktis_utils/logging.rb', line 14

def self.logger=(new_logger)
  @logger = new_logger
end

Instance Method Details

#loggerObject

Method making the logger mixed where needed



5
6
7
# File 'lib/nauktis_utils/logging.rb', line 5

def logger
  Logging.logger
end