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 | |
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')
-rw-r--r-- | activesupport/CHANGELOG | 6 | ||||
-rw-r--r-- | activesupport/lib/active_support/deprecation.rb | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG index 0add31cb50..114ce90c1e 100644 --- a/activesupport/CHANGELOG +++ b/activesupport/CHANGELOG @@ -1,9 +1,11 @@ *SVN* +* Deprecation: warn on stderr if RAILS_DEFAULT_LOGGER isn't set yet. [Jeremy +Kemper] + * Optimize Class Inheritable Attributes so that unnecessary hashes are not created. Closes #7472 [Bruce Perens] -* Ruby 1.8-cvs and 1.9 define a private Time#to_date that overrides Active -Support. Make it public to preserve compatibility. [Jeremy Kemper] +* Ruby 1.8-cvs and 1.9 define a private Time#to_date that overrides Active Support. Make it public to preserve compatibility. [Jeremy Kemper] * Full test coverage for Inflector. #7228 [Dan Kubb] 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 } } |