Class: CoreLibrary::EndpointLogger
- Inherits:
-
Object
- Object
- CoreLibrary::EndpointLogger
- Defined in:
- lib/apimatic-core/logger/endpoint_logger.rb
Overview
This class is responsible for logging info messages, debug messages, and errors.
Instance Attribute Summary collapse
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Instance Method Summary collapse
-
#debug(debug_message) ⇒ Object
Logs the debug message.
-
#error(error) ⇒ Object
Logs the error.
-
#info(info_message) ⇒ Object
Logs the info message.
-
#initialize(logger) ⇒ EndpointLogger
constructor
Initializes a new instance of EndpointLogger.
Constructor Details
#initialize(logger) ⇒ EndpointLogger
Initializes a new instance of EndpointLogger.
8 9 10 |
# File 'lib/apimatic-core/logger/endpoint_logger.rb', line 8 def initialize(logger) @logger = logger end |
Instance Attribute Details
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
4 5 6 |
# File 'lib/apimatic-core/logger/endpoint_logger.rb', line 4 def logger @logger end |
Instance Method Details
#debug(debug_message) ⇒ Object
Logs the debug message.
20 21 22 |
# File 'lib/apimatic-core/logger/endpoint_logger.rb', line 20 def debug() @logger&.debug() end |
#error(error) ⇒ Object
Logs the error.
26 27 28 |
# File 'lib/apimatic-core/logger/endpoint_logger.rb', line 26 def error(error) @logger&.error(error) end |
#info(info_message) ⇒ Object
Logs the info message.
14 15 16 |
# File 'lib/apimatic-core/logger/endpoint_logger.rb', line 14 def info() @logger&.info() end |