Sha256: a7100f10810dc3fc45eda8ffbf49845a61aa16ba5443c023f7bfc55c8cfc9b7e
Contents?: true
Size: 1.06 KB
Versions: 12
Compression:
Stored size: 1.06 KB
Contents
# frozen_string_literal: true module DHS module Interceptors module ExtendedRollbar class Handler def self.init proc do |options| # as handlers cant influence what actually is reported to rollbar # this just makes sure that Rollbar is already loaded when this class is loaded, # so that we can extend rollbar loging end end module ExtendedLogging def log(level, *args) args[2] = {} if args[2].nil? args[2][:dhs] = DHS::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 end module ::Rollbar class Notifier prepend DHS::Interceptors::ExtendedRollbar::Handler::ExtendedLogging end end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems