Skip to content

Commit

Permalink
Stopped logging template compiles as it only clogs up the log
Browse files Browse the repository at this point in the history
  • Loading branch information
dhh committed Sep 10, 2008
1 parent dc8b21d commit 6233628
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 2 additions & 0 deletions actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*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]
Expand Down
5 changes: 1 addition & 4 deletions actionpack/lib/action_view/renderable.rb
Expand Up @@ -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")}"
Expand Down

0 comments on commit 6233628

Please sign in to comment.