aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/abstract_controller
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2009-12-26 20:28:53 +0100
committerJosé Valim <jose.valim@gmail.com>2009-12-26 20:28:53 +0100
commit75ba102a80965b2612df0253d1278581a88b8d66 (patch)
tree435658d7914821be2e745bf3468139cf6a753a07 /actionpack/lib/abstract_controller
parent8a36e907d2a0a28be1fa8334221cc2e195d75168 (diff)
downloadrails-75ba102a80965b2612df0253d1278581a88b8d66.tar.gz
rails-75ba102a80965b2612df0253d1278581a88b8d66.tar.bz2
rails-75ba102a80965b2612df0253d1278581a88b8d66.zip
Remove ActionView inline logging to ActiveSupport::Notifications and create ActionController::Base#log_event, so everything can be logged within one listener. Also expose log_process_action as a hook for different modules to include their own information during the action processing. This allow ActiveRecord to hook and any other ORM. Finally, this commit changes 'Processing' and 'Rendering' in logs to 'Processed' and 'Rendered' because at the point it's logged, everying already happened.
Diffstat (limited to 'actionpack/lib/abstract_controller')
-rw-r--r--actionpack/lib/abstract_controller/logger.rb20
1 files changed, 0 insertions, 20 deletions
diff --git a/actionpack/lib/abstract_controller/logger.rb b/actionpack/lib/abstract_controller/logger.rb
index e3bcd28da7..a23a13e1d6 100644
--- a/actionpack/lib/abstract_controller/logger.rb
+++ b/actionpack/lib/abstract_controller/logger.rb
@@ -9,25 +9,5 @@ module AbstractController
cattr_accessor :logger
extend ActiveSupport::Benchmarkable
end
-
- # A class that allows you to defer expensive processing
- # until the logger actually tries to log. Otherwise, you are
- # forced to do the processing in advance, and send the
- # entire processed String to the logger, which might
- # just discard the String if the log level is too low.
- #
- # TODO: Require that Rails loggers accept a block.
- class DelayedLog < ActiveSupport::BasicObject
- def initialize(&block)
- @str, @block = nil, block
- end
-
- def method_missing(*args, &block)
- unless @str
- @str, @block = @block.call, nil
- end
- @str.send(*args, &block)
- end
- end
end
end