class Ingenico::Connect::SDK::Logging::StdoutCommunicatorLogger

{Ingenico::Connect::SDK::Logging::CommunicatorLogger} that logs the messages to $stdout.

Public Class Methods

new() click to toggle source
# File lib/ingenico/connect/sdk/logging/stdout_communicator_logger.rb, line 11
def initialize
  # implement the interface
end

Public Instance Methods

log(msg, thrown=false) click to toggle source

Logs a single error or non-error message to $stdout.

# File lib/ingenico/connect/sdk/logging/stdout_communicator_logger.rb, line 21
def log(msg, thrown=false)
  $stdout.puts get_date_prefix + msg
  $stdout.puts thrown.to_s if thrown
  $stdout.puts thrown.backtrace.join($RS) if thrown
end

Private Instance Methods

get_date_prefix() click to toggle source
# File lib/ingenico/connect/sdk/logging/stdout_communicator_logger.rb, line 29
def get_date_prefix
  Time.now.strftime("%Y-%m-%dT%H:%M:%S ")
end