Module: Logging

Included in:
Network, Protocol, Runner
Defined in:
lib/software_challenge_client/logging.rb

Overview

Dieses Modul kann inkludiert werden, um eine Logausgabe auf der Konsole verwenden zu k├Ânnen. See stackoverflow.com/a/6768164/390808

Verwendung:

class MyClass
  include Logging

  def a_method(x)
    logger.debug "you provided #{x}"
  end
end

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.loggerObject

Global, memoized, lazy initialized instance of a logger


22
23
24
# File 'lib/software_challenge_client/logging.rb', line 22

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

Instance Method Details

#loggerObject


17
18
19
# File 'lib/software_challenge_client/logging.rb', line 17

def logger
  Logging.logger
end