Class: PriceHubble::Instrumentation::LogSubscriber
- Inherits:
-
ActiveSupport::LogSubscriber
- Object
- ActiveSupport::LogSubscriber
- PriceHubble::Instrumentation::LogSubscriber
- Defined in:
- lib/price_hubble/instrumentation/log_subscriber.rb
Overview
Produce logs for requests.
Instance Method Summary collapse
-
#logger ⇒ Logger?
Return the PriceHubble SDK configured logger when logging is enabled.
-
#request(event) ⇒ Object
Log request statistics and debugging details.
Instance Method Details
#logger ⇒ Logger?
Return the PriceHubble SDK configured logger when logging is enabled. Otherwise nil
is returned and the subscriber is never started.
11 12 13 14 15 |
# File 'lib/price_hubble/instrumentation/log_subscriber.rb', line 11 def logger return unless PriceHubble.configuration.request_logging PriceHubble.configuration.logger end |
#request(event) ⇒ Object
Log request statistics and debugging details.
20 21 22 23 24 |
# File 'lib/price_hubble/instrumentation/log_subscriber.rb', line 20 def request(event) log_action_summary(event) log_request_details(event) log_response_details(event) end |