Module: LHS::Interceptors::ExtendedRollbar::Handler::ExtendedLogging

Defined in:
lib/lhs/interceptors/extended_rollbar/handler.rb

Instance Method Summary collapse

Instance Method Details

#log(level, *args) ⇒ Object


17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/lhs/interceptors/extended_rollbar/handler.rb', line 17

def log(level, *args)
  args[2] = {} if args[2].nil?
  args[2][:lhs] = LHS::Interceptors::ExtendedRollbar::ThreadRegistry.log.map do |entry|
    {
      request: entry[:request].options,
      response: {
        code: entry[:response].code,
        body: entry[:response].body
      }
    }
  end.to_json
  super
end