Sha256: 502b140537e79d654cd1755eb7b733e3676d880cf56359b1f02e4b60b7cd5e01
Contents?: true
Size: 777 Bytes
Versions: 17
Compression:
Stored size: 777 Bytes
Contents
# typed: false # frozen_string_literal: true # ActiveJob logs the arguments passed to the job. This initializer filters out sensitive information from the logs. # cf. https://github.com/rails/rails/pull/34438#issuecomment-2336749226 Rails.application.config.after_initialize do require "active_job/log_subscriber" module ActiveJob class LogSubscriber < ActiveSupport::LogSubscriber alias_method :original_format, :format private def format(arg) if arg.is_a?(Hash) parameter_filter = ActiveSupport::ParameterFilter.new(Rails.application.config.filter_parameters) parameter_filter.filter(arg.transform_values { |value| original_format(value) }) else original_format(arg) end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems