Sha256: b73e4c458076de52f4d6867003b1d6b3bb5861819e052f1a24c6893cd7707fef

Contents?: true

Size: 664 Bytes

Versions: 1

Compression:

Stored size: 664 Bytes

Contents

class Grape::Middleware::Logger::Railtie < Rails::Railtie
  options = Rails::VERSION::MAJOR < 5 ? { after: :load_config_initializers } : {}
  initializer 'grape.middleware.logger', options do
    Grape::Middleware::Logger.logger = Rails.application.config.logger || Rails.logger.presence
    parameter_filter_class = if Rails::VERSION::MAJOR >= 6
                               ActiveSupport::ParameterFilter
                             else
                               ActionDispatch::Http::ParameterFilter
                             end
    Grape::Middleware::Logger.filter = parameter_filter_class.new Rails.application.config.filter_parameters
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
grape-middleware-logger-1.12.0 lib/grape/middleware/logger/railtie.rb