From 9daddf0116f2e88153e4473bb9aa5b8edc186963 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Thu, 8 Feb 2007 00:17:39 +0000 Subject: Deprecation: warn on stderr if RAILS_DEFAULT_LOGGER isn't set yet. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6140 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/lib/active_support/deprecation.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'activesupport/lib/active_support') diff --git a/activesupport/lib/active_support/deprecation.rb b/activesupport/lib/active_support/deprecation.rb index d2c6127461..8499ad6e2d 100644 --- a/activesupport/lib/active_support/deprecation.rb +++ b/activesupport/lib/active_support/deprecation.rb @@ -13,8 +13,9 @@ module ActiveSupport $stderr.puts callstack.join("\n ") if debug }, 'development' => Proc.new { |message, callstack| - RAILS_DEFAULT_LOGGER.warn message - RAILS_DEFAULT_LOGGER.debug callstack.join("\n ") if debug + logger = defined?(::RAILS_DEFAULT_LOGGER) ? ::RAILS_DEFAULT_LOGGER : Logger.new($stderr) + logger.warn message + logger.debug callstack.join("\n ") if debug } } -- cgit v1.2.3