Sha256: c3e746a782384807df7e42e3568c0d331fb58bceb58d3beefc89c039d1d85b4f
Contents?: true
Size: 538 Bytes
Versions: 20
Compression:
Stored size: 538 Bytes
Contents
require 'airbrake' require 'faraday' module Saddle module Middleware module Logging # Public: Log exceptions using the Rails logger # class RailsLogger < Faraday::Middleware def call(env) begin @app.call(env) rescue => e if defined?(Rails.logger) Rails.logger.error("#{env[:request][:saddle][:client].name} error: #{e}") end # Re-raise the error raise end end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems