Class: Ingenico::Connect::SDK::Logging::StdoutCommunicatorLogger

Inherits:
CommunicatorLogger show all
Includes:
Singleton
Defined in:
lib/ingenico/connect/sdk/logging/stdout_communicator_logger.rb

Overview

Logging class that logs the messages to $stdout.

Instance Method Summary collapse

Constructor Details

#initializeStdoutCommunicatorLogger

Returns a new instance of StdoutCommunicatorLogger.



13
14
15
# File 'lib/ingenico/connect/sdk/logging/stdout_communicator_logger.rb', line 13

def initialize
  # implement the interface
end

Instance Method Details

#log(msg, thrown = false) ⇒ Object

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



23
24
25
26
27
# File 'lib/ingenico/connect/sdk/logging/stdout_communicator_logger.rb', line 23

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