Stopped logging template compiles as it only clogs up the log

上级 dc8b21dc
*Edge* *Edge*
* Stopped logging template compiles as it only clogs up the log [DHH]
* Changed the X-Runtime header to report in milliseconds [DHH] * Changed the X-Runtime header to report in milliseconds [DHH]
* Changed BenchmarkHelper#benchmark to report in milliseconds [DHH] * Changed BenchmarkHelper#benchmark to report in milliseconds [DHH]
......
...@@ -72,12 +72,9 @@ def #{render_symbol}(local_assigns) ...@@ -72,12 +72,9 @@ def #{render_symbol}(local_assigns)
end_src end_src
begin begin
logger = defined?(ActionController) && Base.logger
logger.debug "Compiling template #{render_symbol}" if logger
ActionView::Base::CompiledTemplates.module_eval(source, filename, 0) ActionView::Base::CompiledTemplates.module_eval(source, filename, 0)
rescue Exception => e # errors from template code rescue Exception => e # errors from template code
if logger if logger = defined?(ActionController) && Base.logger
logger.debug "ERROR: compiling #{render_symbol} RAISED #{e}" logger.debug "ERROR: compiling #{render_symbol} RAISED #{e}"
logger.debug "Function body: #{source}" logger.debug "Function body: #{source}"
logger.debug "Backtrace: #{e.backtrace.join("\n")}" logger.debug "Backtrace: #{e.backtrace.join("\n")}"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册