rails4: create log directory if it doesn't exist
refs #CNVS-21596 Change-Id: Iceb2109201a8cd98054a808439fa09983c462b36 Reviewed-on: https://gerrit.instructure.com/59146 Tested-by: Jenkins Reviewed-by: Rob Orton <rob@instructure.com> Product-Review: James Williams <jamesw@instructure.com> QA-Review: James Williams <jamesw@instructure.com>
This commit is contained in:
parent
16a8d9421a
commit
d2f69ac342
|
@ -4,6 +4,9 @@ class CanvasLogger < (CANVAS_RAILS3 ? ActiveSupport::BufferedLogger : ActiveSupp
|
|||
attr_reader :log_path
|
||||
|
||||
def initialize(log_path, level = DEBUG, options = {})
|
||||
unless File.exist?(log_path)
|
||||
FileUtils.mkdir_p(File.dirname(log_path))
|
||||
end
|
||||
super(log_path, level)
|
||||
@log_path = log_path
|
||||
@skip_thread_context = options[:skip_thread_context]
|
||||
|
|
Loading…
Reference in New Issue