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



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

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

Instance Method Details

#loggerObject



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

def logger
  Logging.logger
end