diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2009-12-27 14:44:21 -0800 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2009-12-27 14:44:21 -0800 |
commit | 5012a1558dd1483df525f1fac1e649e089be886a (patch) | |
tree | 983136a50ee7bb135768038e33c9c226a3a167ed /actionpack/lib/abstract_controller/logger.rb | |
parent | 1cd949006a419807d5ae3400442942b752780ca2 (diff) | |
parent | 12e43494a748e0144195be12dc19161cc3e4d39f (diff) | |
download | rails-5012a1558dd1483df525f1fac1e649e089be886a.tar.gz rails-5012a1558dd1483df525f1fac1e649e089be886a.tar.bz2 rails-5012a1558dd1483df525f1fac1e649e089be886a.zip |
Merge branch 'master' of github.com:rails/rails
Diffstat (limited to 'actionpack/lib/abstract_controller/logger.rb')
-rw-r--r-- | actionpack/lib/abstract_controller/logger.rb | 20 |
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 |