diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-02-08 00:17:39 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-02-08 00:17:39 +0000 |
commit | 9daddf0116f2e88153e4473bb9aa5b8edc186963 (patch) | |
tree | 8f4a7fbeb1ef4fc3f1444a680e2a9f1c1850d69f /activesupport/lib | |
parent | 83752373b9c83bf585b5fe44836c65612b680cf9 (diff) | |
download | rails-9daddf0116f2e88153e4473bb9aa5b8edc186963.tar.gz rails-9daddf0116f2e88153e4473bb9aa5b8edc186963.tar.bz2 rails-9daddf0116f2e88153e4473bb9aa5b8edc186963.zip |
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
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/deprecation.rb | 5 |
1 files changed, 3 insertions, 2 deletions
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 } } |