Class: Omise::HTTPLogger
- Inherits:
-
Object
- Object
- Omise::HTTPLogger
- Defined in:
- lib/omise/http_logger.rb
Constant Summary collapse
- LABEL =
"[Omise]".freeze
Instance Attribute Summary collapse
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Instance Method Summary collapse
-
#initialize(logger = nil) ⇒ HTTPLogger
constructor
A new instance of HTTPLogger.
- #log_request(request) ⇒ Object
- #log_response(response) ⇒ Object
Constructor Details
#initialize(logger = nil) ⇒ HTTPLogger
Returns a new instance of HTTPLogger.
5 6 7 |
# File 'lib/omise/http_logger.rb', line 5 def initialize(logger = nil) @logger = logger end |
Instance Attribute Details
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
9 10 11 |
# File 'lib/omise/http_logger.rb', line 9 def logger @logger end |
Instance Method Details
#log_request(request) ⇒ Object
11 12 13 |
# File 'lib/omise/http_logger.rb', line 11 def log_request(request) info(format_request(request)) end |
#log_response(response) ⇒ Object
15 16 17 |
# File 'lib/omise/http_logger.rb', line 15 def log_response(response) info(format_response(response)) end |