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
Logging class 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.
12 13 14 |
# File 'lib/onlinepayments/sdk/logging/stdout_communicator_logger.rb', line 12 def initialize # implement the interface end |
Instance Method Details
#log(msg, thrown = nil) ⇒ Object
Logs a single error or non-error message to $stdout.
17 18 19 20 21 |
# File 'lib/onlinepayments/sdk/logging/stdout_communicator_logger.rb', line 17 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 |