Class: OnlinePayments::SDK::Logging::StdoutCommunicatorLogger
- Inherits:
-
CommunicatorLogger
- Object
- CommunicatorLogger
- OnlinePayments::SDK::Logging::StdoutCommunicatorLogger
- Includes:
- Singleton
- Defined in:
- lib/onlinepayments/sdk/logging/stdout_communicator_logger.rb
Overview
CommunicatorLogger that logs the messages to $stdout.
Instance Method Summary collapse
-
#initialize ⇒ StdoutCommunicatorLogger
constructor
A new instance of StdoutCommunicatorLogger.
-
#log(msg, thrown = nil) ⇒ Object
Logs a single error or non-error message to $stdout.
Constructor Details
#initialize ⇒ StdoutCommunicatorLogger
Returns a new instance of StdoutCommunicatorLogger.
11 12 13 |
# File 'lib/onlinepayments/sdk/logging/stdout_communicator_logger.rb', line 11 def initialize # implement the interface end |
Instance Method Details
#log(msg, thrown = nil) ⇒ Object
Logs a single error or non-error message to $stdout.
21 22 23 24 25 |
# File 'lib/onlinepayments/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 |