Sha256: e4ca87e656bf32643cfe1a5f01c0526a2f67695cb0ce2514e6ca152695178b11

Contents?: true

Size: 342 Bytes

Versions: 92

Compression:

Stored size: 342 Bytes

Contents

require 'log4r'

module Slaw
  module Logging
    
    # Get an instance to a logger configured for the class that includes it.
    # This allows log messages to include the class name
    def logger
      return @logger if @logger
      
      @logger = Log4r::Logger[self.class.name] || Log4r::Logger.new(self.class.name)
    end
  end
end

Version data entries

92 entries across 92 versions & 1 rubygems

Version Path
slaw-13.0.0 lib/slaw/logging.rb
slaw-12.0.0 lib/slaw/logging.rb
slaw-11.0.0 lib/slaw/logging.rb
slaw-10.7.0 lib/slaw/logging.rb
slaw-10.6.0 lib/slaw/logging.rb
slaw-10.5.0 lib/slaw/logging.rb
slaw-10.4.1 lib/slaw/logging.rb
slaw-10.4.0 lib/slaw/logging.rb
slaw-10.3.1 lib/slaw/logging.rb
slaw-10.2.0 lib/slaw/logging.rb
slaw-10.1.0 lib/slaw/logging.rb
slaw-10.0.0 lib/slaw/logging.rb
slaw-9.2.0 lib/slaw/logging.rb
slaw-9.1.0 lib/slaw/logging.rb
slaw-9.0.0 lib/slaw/logging.rb
slaw-8.0.1 lib/slaw/logging.rb
slaw-8.0.0 lib/slaw/logging.rb
slaw-7.0.0 lib/slaw/logging.rb
slaw-6.2.0 lib/slaw/logging.rb
slaw-6.1.0 lib/slaw/logging.rb