Class: LogToolbox::LogController
  
  
  
  
  
    - Inherits:
- 
      ActionController::Base
      
        
          - Object
- ActionController::Base
- LogToolbox::LogController
 show all
      - Includes:
- LogPayload
    - Defined in:
- lib/log_toolbox/log_controller.rb
 
  
    
      Instance Method Summary
      collapse
    
    
  
  
  
  
  
  
  
  
  
  Methods included from LogPayload
  #append_info_to_payload
  
  
  
  
  
  
  
  
  
  Methods included from LogHelper
  #log_critical, #log_debug, #log_error, #log_info, #log_warn
  
  
    Instance Method Details
    
      
  
  
    #change_level  ⇒ Object 
  
  
  
  
    | 
10
11
12
13
14
15
16
17
18
19 | # File 'lib/log_toolbox/log_controller.rb', line 10
def change_level
  log_info("Log level was changed to #{level_param}")
  Rails.logger.level = Logger.const_get(level_param.upcase)
  render json: {
    message: "Your application log level was changed to #{rails_logger}",
    log_options: options,
    log_levels: levels
  }
end | 
 
    
      
  
  
    #test  ⇒ Object 
  
  
  
  
    | 
21
22
23
24
25
26
27
28
29
30
31
32
33 | # File 'lib/log_toolbox/log_controller.rb', line 21
def test
  log_debug('Log level DEBUG')
  log_info('Log level INFO')
  log_warn('Log level WARN')
  log_error('Log level ERR')
  log_critical('Log level CRIT')
  render json: {
    message: "Your application log level is #{rails_logger}",
    log_options: options,
    log_levels: levels
  }
end |