aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/railties
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-01-17 12:41:55 +0100
committerJosé Valim <jose.valim@gmail.com>2010-01-17 12:43:17 +0100
commit27d9836ad3519d57462b86a4e539c1aa176b6d95 (patch)
tree8a228e43b44285ab7fd3a63d8908fbe4469d3a1e /actionpack/lib/action_controller/railties
parent61ada28ed3cdc42efa6f9714e909231959b88c26 (diff)
downloadrails-27d9836ad3519d57462b86a4e539c1aa176b6d95.tar.gz
rails-27d9836ad3519d57462b86a4e539c1aa176b6d95.tar.bz2
rails-27d9836ad3519d57462b86a4e539c1aa176b6d95.zip
Add ActionDispatch::Railties::Subscriber and finish tidying up the logging.
Diffstat (limited to 'actionpack/lib/action_controller/railties')
-rw-r--r--actionpack/lib/action_controller/railties/subscriber.rb7
1 files changed, 1 insertions, 6 deletions
diff --git a/actionpack/lib/action_controller/railties/subscriber.rb b/actionpack/lib/action_controller/railties/subscriber.rb
index a9f5d16c58..6659e5df47 100644
--- a/actionpack/lib/action_controller/railties/subscriber.rb
+++ b/actionpack/lib/action_controller/railties/subscriber.rb
@@ -3,18 +3,13 @@ module ActionController
class Subscriber < Rails::Subscriber
def process_action(event)
payload = event.payload
-
- info "\nProcessed #{payload[:controller]}##{payload[:action]} " \
- "to #{payload[:formats].join(', ')} (for #{payload[:remote_ip]} at #{event.time.to_s(:db)}) " \
- "[#{payload[:method].to_s.upcase}]"
-
info " Parameters: #{payload[:params].inspect}" unless payload[:params].blank?
additions = ActionController::Base.log_process_action(payload)
message = "Completed in %.0fms" % event.duration
message << " (#{additions.join(" | ")})" unless additions.blank?
- message << " | #{payload[:status]} [#{payload[:request_uri]}]\n\n"
+ message << " by #{payload[:controller]}##{payload[:action]} [#{payload[:status]}]"
info(message)
end