Module: LogUtils::Logging

Defined in:
lib/logutils.rb

Overview

use it like

class SampleClass
  include LogUtils::Logging
  ...
end

or

include LogUtils

class SampleClass
  include Logging
  ...
end

class AnotherSampleClass
  include Logging
  ...
  def sample_method
     logger.debug "calling sample_method"
  end
end

Instance Method Summary collapse

Instance Method Details

#loggerObject



78
79
80
# File 'lib/logutils.rb', line 78

def logger
  @logger ||= LogKernel::Logger[ self ]
end