Sha256: 1d11403d25decd3f5312f3c2f738d6b703cfb76b21ff892f31821f1ad52fe750

Contents?: true

Size: 636 Bytes

Versions: 3

Compression:

Stored size: 636 Bytes

Contents

# Log actual exceptions, not a string representation
require "action_dispatch"

module ActionDispatch
  class DebugExceptions
    private

    undef_method :log_error
    if (Rails::VERSION::MAJOR == 7 && Rails::VERSION::MINOR >= 1) || Rails::VERSION::MAJOR > 7
      def log_error(_request, wrapper)
        Rails.application.deprecators.silence do
          ActionController::Base.logger.fatal(wrapper.exception)
        end
      end
    else
      def log_error(_request, wrapper)
        ActiveSupport::Deprecation.silence do
          ActionController::Base.logger.fatal(wrapper.exception)
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rails_semantic_logger-4.17.0 lib/rails_semantic_logger/extensions/action_dispatch/debug_exceptions.rb
rails_semantic_logger-4.16.0 lib/rails_semantic_logger/extensions/action_dispatch/debug_exceptions.rb
rails_semantic_logger-4.15.0 lib/rails_semantic_logger/extensions/action_dispatch/debug_exceptions.rb