Sha256: 56df31161bb8501784caa1108186b64940989e913e677005ba136437bd4687eb

Contents?: true

Size: 496 Bytes

Versions: 11

Compression:

Stored size: 496 Bytes

Contents

# coding: utf-8
require 'logger'

# Dieses Modul kann inkludiert werden, um eine Logausgabe auf der Konsole verwenden zu können.
# See http://stackoverflow.com/a/6768164/390808
#
# Verwendung:
#
#   class MyClass
#     include Logging
#
#     def a_method(x)
#       logger.debug "you provided #{x}"
#     end
#   end
module Logging
  def logger
    Logging.logger
  end

  # Global, memoized, lazy initialized instance of a logger
  def self.logger
    @logger ||= Logger.new(STDOUT)
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
software_challenge_client-20.2.4 lib/software_challenge_client/logging.rb
software_challenge_client-20.2.3 lib/software_challenge_client/logging.rb
software_challenge_client-20.2.2 lib/software_challenge_client/logging.rb
software_challenge_client-20.2.1 lib/software_challenge_client/logging.rb
software_challenge_client-20.2.0 lib/software_challenge_client/logging.rb
software_challenge_client-19.1.0 lib/software_challenge_client/logging.rb
software_challenge_client-19.0.4 lib/software_challenge_client/logging.rb
software_challenge_client-19.0.3 lib/software_challenge_client/logging.rb
software_challenge_client-19.0.2 lib/software_challenge_client/logging.rb
software_challenge_client-19.0.1 lib/software_challenge_client/logging.rb
software_challenge_client-19.0.0 lib/software_challenge_client/logging.rb