diff options
author | Joshua Peek <josh@joshpeek.com> | 2008-08-18 22:38:58 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-08-18 23:36:13 -0500 |
commit | c1a8690d582c08777055caf449c03f85b4c8aa4b (patch) | |
tree | aa88127d58845658f32fb9284b0f837f13700800 /actionpack/lib/action_controller/dispatcher.rb | |
parent | a4da8175a2c989104de1a38e43d5ddfb0f89b055 (diff) | |
download | rails-c1a8690d582c08777055caf449c03f85b4c8aa4b.tar.gz rails-c1a8690d582c08777055caf449c03f85b4c8aa4b.tar.bz2 rails-c1a8690d582c08777055caf449c03f85b4c8aa4b.zip |
Consistently use the framework's configured logger and avoid reverting to RAILS_DEFAULT_LOGGER unless necessary.
Diffstat (limited to 'actionpack/lib/action_controller/dispatcher.rb')
-rw-r--r-- | actionpack/lib/action_controller/dispatcher.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/dispatcher.rb b/actionpack/lib/action_controller/dispatcher.rb index 835d8e834e..7e46f572fe 100644 --- a/actionpack/lib/action_controller/dispatcher.rb +++ b/actionpack/lib/action_controller/dispatcher.rb @@ -24,7 +24,7 @@ module ActionController to_prepare(:activerecord_instantiate_observers) { ActiveRecord::Base.instantiate_observers } end - after_dispatch :flush_logger if defined?(RAILS_DEFAULT_LOGGER) && RAILS_DEFAULT_LOGGER.respond_to?(:flush) + after_dispatch :flush_logger if Base.logger && Base.logger.respond_to?(:flush) end # Backward-compatible class method takes CGI-specific args. Deprecated @@ -142,7 +142,7 @@ module ActionController end def flush_logger - RAILS_DEFAULT_LOGGER.flush + Base.logger.flush end protected |