Class: JSONAPI::Rails::LogSubscriber
- Inherits:
-
ActiveSupport::LogSubscriber
- Object
- ActiveSupport::LogSubscriber
- JSONAPI::Rails::LogSubscriber
- Defined in:
- lib/jsonapi/rails/log_subscriber.rb
Instance Method Summary collapse
Instance Method Details
#logger ⇒ Object
18 19 20 |
# File 'lib/jsonapi/rails/log_subscriber.rb', line 18 def logger JSONAPI::Rails.logger end |
#parse(event) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/jsonapi/rails/log_subscriber.rb', line 11 def parse(event) info do "Completed JSON API deserializing of #{event.payload[:key]}" \ " (#{event.duration.round(2)})" end end |
#render(event) ⇒ Object
5 6 7 8 9 |
# File 'lib/jsonapi/rails/log_subscriber.rb', line 5 def render(event) info do "Completed JSON API rendering (#{event.duration.round(2)}ms)" end end |