aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-01-03 20:39:42 +0100
committerJosé Valim <jose.valim@gmail.com>2010-01-03 20:39:42 +0100
commit6fbe9ef2ffb1858027130789246f3ae24a0a182f (patch)
tree6926a804d3b78021e421470518bf10d2ca919ef9 /actionpack/lib/action_controller/metal
parent4796be33a464a4587d0e22dfef113aca597c91c4 (diff)
downloadrails-6fbe9ef2ffb1858027130789246f3ae24a0a182f.tar.gz
rails-6fbe9ef2ffb1858027130789246f3ae24a0a182f.tar.bz2
rails-6fbe9ef2ffb1858027130789246f3ae24a0a182f.zip
Use namespaces in notifications.
Diffstat (limited to 'actionpack/lib/action_controller/metal')
-rw-r--r--actionpack/lib/action_controller/metal/logger.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/metal/logger.rb b/actionpack/lib/action_controller/metal/logger.rb
index 4f4370e5f0..0dcab86f10 100644
--- a/actionpack/lib/action_controller/metal/logger.rb
+++ b/actionpack/lib/action_controller/metal/logger.rb
@@ -15,7 +15,8 @@ module ActionController
attr_internal :view_runtime
def process_action(action)
- ActiveSupport::Notifications.instrument(:process_action, :controller => self, :action => action) do
+ ActiveSupport::Notifications.instrument("actioncontroller.process_action",
+ :controller => self, :action => action) do
super
end
end
@@ -50,7 +51,7 @@ module ActionController
# This is the hook invoked by ActiveSupport::Notifications.subscribe.
# If you need to log any event, overwrite the method and do it here.
def log_event(name, before, after, instrumenter_id, payload) #:nodoc:
- if name == :process_action
+ if name == "actioncontroller.process_action"
duration = [(after - before) * 1000, 0.01].max
controller = payload[:controller]
request = controller.request
@@ -66,7 +67,7 @@ module ActionController
message << " [#{request.request_uri rescue "unknown"}]"
logger.info(message)
- elsif name == :render_template
+ elsif name == "actionview.render_template"
# TODO Make render_template logging work if you are using just ActionView
duration = (after - before) * 1000
message = "Rendered #{payload[:identifier]}"