rails4: set config.log_level on boot
otherwise it will ovewrite logger.level with the default (:info on production) refs #CNVS-21596 Change-Id: I18352300b769d141de7a83959568e627f6a519b4 Reviewed-on: https://gerrit.instructure.com/61257 Reviewed-by: Cody Cutrer <cody@instructure.com> Tested-by: Jenkins Product-Review: James Williams <jamesw@instructure.com> QA-Review: James Williams <jamesw@instructure.com>
This commit is contained in:
parent
66550c0ce5
commit
882e2add5c
|
@ -55,8 +55,11 @@ module CanvasRails
|
|||
log_config = { 'logger' => 'rails', 'log_level' => 'debug' }.merge(log_config || {})
|
||||
opts = {}
|
||||
require 'canvas_logger'
|
||||
log_level = (CANVAS_RAILS3 ? ActiveSupport::BufferedLogger : ActiveSupport::Logger).const_get(log_config['log_level'].to_s.upcase)
|
||||
|
||||
config.log_level = log_config['log_level']
|
||||
log_level = (CANVAS_RAILS3 ? ActiveSupport::BufferedLogger : ActiveSupport::Logger).const_get(config.log_level.to_s.upcase)
|
||||
opts[:skip_thread_context] = true if log_config['log_context'] == false
|
||||
|
||||
case log_config["logger"]
|
||||
when "syslog"
|
||||
require 'syslog_wrapper'
|
||||
|
|
Loading…
Reference in New Issue