Module: RightSupport::Log::Mixin::InstanceMethods

Defined in:
lib/right_support/log/mixin.rb

Overview

Instance methods that become available to classes that include Mixin.

Instance Method Summary collapse

Instance Method Details

#loggerObject



92
93
94
# File 'lib/right_support/log/mixin.rb', line 92

def logger
  @logger || (self.class.respond_to?(:logger) && self.class.logger) || RightSupport::Log::Mixin.default_logger
end

#logger=(logger) ⇒ Object



96
97
98
99
# File 'lib/right_support/log/mixin.rb', line 96

def logger=(logger)
  logger = Decorator.new(logger) unless logger.nil? || logger.is_a?(Decorator)
  @logger = logger
end