aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/deprecation
diff options
context:
space:
mode:
authorYehuda Katz <wycats@gmail.com>2009-10-13 10:43:28 -0700
committerYehuda Katz <wycats@gmail.com>2009-10-13 10:43:28 -0700
commit9cd50e7752650a3d6bf8545b51d50619d6e70c0b (patch)
treee1dce1c1de34a09fdd5925744cbe601000e47885 /activesupport/lib/active_support/deprecation
parent610e94c097fcc41aaf11bf5ddd45898718aeeb55 (diff)
downloadrails-9cd50e7752650a3d6bf8545b51d50619d6e70c0b.tar.gz
rails-9cd50e7752650a3d6bf8545b51d50619d6e70c0b.tar.bz2
rails-9cd50e7752650a3d6bf8545b51d50619d6e70c0b.zip
Make logger work again (h/t Sam Ruby)
Diffstat (limited to 'activesupport/lib/active_support/deprecation')
-rw-r--r--activesupport/lib/active_support/deprecation/behaviors.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/deprecation/behaviors.rb b/activesupport/lib/active_support/deprecation/behaviors.rb
index c531a1aa58..0c065fb103 100644
--- a/activesupport/lib/active_support/deprecation/behaviors.rb
+++ b/activesupport/lib/active_support/deprecation/behaviors.rb
@@ -23,7 +23,7 @@ module ActiveSupport
$stderr.puts callstack.join("\n ") if debug
},
'development' => Proc.new { |message, callstack|
- logger = defined?(Rails) ? Rails.logger : Logger.new($stderr)
+ logger = (Rails.logger if defined?(Rails)) || Logger.new($stderr)
logger.warn message
logger.debug callstack.join("\n ") if debug
}