diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-10-14 17:54:45 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-10-14 18:03:07 -0700 |
commit | a9f9ae385e2145b7f0d1ae43a7b66ed280b220b9 (patch) | |
tree | 1eb5f0e51a2cbf9e1004c0363e135962fc90df2b /activesupport | |
parent | bc1a18d7bd8898fea6d41d59f4016b4be51e371b (diff) | |
download | rails-a9f9ae385e2145b7f0d1ae43a7b66ed280b220b9.tar.gz rails-a9f9ae385e2145b7f0d1ae43a7b66ed280b220b9.tar.bz2 rails-a9f9ae385e2145b7f0d1ae43a7b66ed280b220b9.zip |
Explicitly require logger
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/deprecation/behaviors.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/deprecation/behaviors.rb b/activesupport/lib/active_support/deprecation/behaviors.rb index 0c065fb103..ca23d45666 100644 --- a/activesupport/lib/active_support/deprecation/behaviors.rb +++ b/activesupport/lib/active_support/deprecation/behaviors.rb @@ -23,7 +23,13 @@ module ActiveSupport $stderr.puts callstack.join("\n ") if debug }, 'development' => Proc.new { |message, callstack| - logger = (Rails.logger if defined?(Rails)) || Logger.new($stderr) + logger = + if defined?(Rails) && Rails.logger + Rails.logger + else + require 'logger' + Logger.new($stderr) + end logger.warn message logger.debug callstack.join("\n ") if debug } |