diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-13 23:19:11 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-14 01:07:03 +0100 |
commit | f921ad5c97048c692859b395bc78245a343bf833 (patch) | |
tree | 6eec831da1283ac59627a172c908276573b02f54 /actionpack/lib/action_controller/metal | |
parent | 116df09c3e4a57a6b0a57a5134c451687113ece1 (diff) | |
download | rails-f921ad5c97048c692859b395bc78245a343bf833.tar.gz rails-f921ad5c97048c692859b395bc78245a343bf833.tar.bz2 rails-f921ad5c97048c692859b395bc78245a343bf833.zip |
Tidy up ActiveRecord and Views runtime information on process action logger.
Diffstat (limited to 'actionpack/lib/action_controller/metal')
-rw-r--r-- | actionpack/lib/action_controller/metal/instrumentation.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/metal/instrumentation.rb b/actionpack/lib/action_controller/metal/instrumentation.rb index 91d454f0c3..e0c75c9e44 100644 --- a/actionpack/lib/action_controller/metal/instrumentation.rb +++ b/actionpack/lib/action_controller/metal/instrumentation.rb @@ -66,11 +66,13 @@ module ActionController module ClassMethods # A hook which allows other frameworks to log what happened during - # controller process action. + # controller process action. This method should return an awway + # with the messages to be added. # :api: plugin def log_process_action(controller) #:nodoc: - view_runtime = controller.send :view_runtime - logger.info(" View runtime: %.1fms" % view_runtime.to_f) if view_runtime + messages, view_runtime = [], controller.send(:view_runtime) + messages << ("Views: %.1fms" % view_runtime.to_f) if view_runtime + messages end end end |