Module: ActionController::Logging::ClassMethods
- Defined in:
- actionpack/lib/action_controller/metal/logging.rb
Instance Method Summary collapse
- 
  
    
      #log_at(level, **options)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Set a different log level per request. 
Instance Method Details
#log_at(level, **options) ⇒ Object
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: -> { [:debug] }
end
| 17 18 19 | # File 'actionpack/lib/action_controller/metal/logging.rb', line 17 def log_at(level, **) around_action ->(_, action) { logger.log_at(level, &action) }, ** end |