Class: Worldline::Connect::SDK::Logging::StdoutCommunicatorLogger
- Inherits:
-
CommunicatorLogger
- Object
- CommunicatorLogger
- Worldline::Connect::SDK::Logging::StdoutCommunicatorLogger
- Includes:
- Singleton
- Defined in:
- lib/worldline/connect/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.
13 14 15 |
# File 'lib/worldline/connect/sdk/logging/stdout_communicator_logger.rb', line 13 def initialize # implement the interface end |
Instance Method Details
#log(msg, thrown = nil) ⇒ Object
Logs a single error or non-error message to $stdout.
18 19 20 21 22 |
# File 'lib/worldline/connect/sdk/logging/stdout_communicator_logger.rb', line 18 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 |