Only Benchmark and log if we're going to output the information.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8136 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Michael Koziarski 2007-11-14 09:39:27 +00:00
parent 5ce6d74531
commit 696d140b6c
1 changed files with 1 additions and 1 deletions

View File

@ -112,7 +112,7 @@ module ActionView
add_counter_to_local_assigns!(partial_name, local_assigns)
add_object_to_local_assigns!(partial_name, local_assigns, object)
if logger
if logger && logger.debug?
ActionController::Base.benchmark("Rendered #{path}/_#{partial_name}", Logger::DEBUG, false) do
render("#{path}/_#{partial_name}", local_assigns)
end