Sha256: 9761086be5006a8a29ab3803f6f3e4af66e61761e50798849575041c50ffc990

Contents?: true

Size: 565 Bytes

Versions: 23

Compression:

Stored size: 565 Bytes

Contents

# frozen_string_literal: true

# :markup: markdown

module ActionController
  module Logging
    extend ActiveSupport::Concern

    module ClassMethods
      # Set a different log level per request.
      #
      #     # Use the debug log level if a particular cookie is set.
      #     class ApplicationController < ActionController::Base
      #       log_at :debug, if: -> { cookies[:debug] }
      #     end
      #
      def log_at(level, **options)
        around_action ->(_, action) { logger.log_at(level, &action) }, **options
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
actionpack-8.0.1 lib/action_controller/metal/logging.rb
actionpack-8.0.0.1 lib/action_controller/metal/logging.rb
actionpack-7.2.2.1 lib/action_controller/metal/logging.rb
actionpack-8.0.0 lib/action_controller/metal/logging.rb
actionpack-7.2.2 lib/action_controller/metal/logging.rb
actionpack-8.0.0.rc2 lib/action_controller/metal/logging.rb
actionpack-7.2.1.2 lib/action_controller/metal/logging.rb
actionpack-8.0.0.rc1 lib/action_controller/metal/logging.rb
actionpack-7.2.1.1 lib/action_controller/metal/logging.rb
actionpack-8.0.0.beta1 lib/action_controller/metal/logging.rb
omg-actionpack-8.0.0.alpha9 lib/action_controller/metal/logging.rb
omg-actionpack-8.0.0.alpha8 lib/action_controller/metal/logging.rb
omg-actionpack-8.0.0.alpha7 lib/action_controller/metal/logging.rb
omg-actionpack-8.0.0.alpha4 lib/action_controller/metal/logging.rb
omg-actionpack-8.0.0.alpha3 lib/action_controller/metal/logging.rb
omg-actionpack-8.0.0.alpha2 lib/action_controller/metal/logging.rb
omg-actionpack-8.0.0.alpha1 lib/action_controller/metal/logging.rb
actionpack-7.2.1 lib/action_controller/metal/logging.rb
actionpack-7.2.0 lib/action_controller/metal/logging.rb
actionpack-7.2.0.rc1 lib/action_controller/metal/logging.rb