class Ingenico::Direct::SDK::Logging::StdoutCommunicatorLogger
{Ingenico::Direct::SDK::Logging::CommunicatorLogger} that logs the messages to $stdout.
Public Class Methods
new()
click to toggle source
# File lib/ingenico/direct/sdk/logging/stdout_communicator_logger.rb, line 11 def initialize # implement the interface end
Public Instance Methods
log(msg, thrown = nil)
click to toggle source
Logs a single error or non-error message to $stdout.
# File lib/ingenico/direct/sdk/logging/stdout_communicator_logger.rb, line 21 def log(msg, thrown = nil) $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/direct/sdk/logging/stdout_communicator_logger.rb, line 29 def get_date_prefix Time.now.strftime("%Y-%m-%dT%H:%M:%S ") end