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
This commit is contained in:
Jeremy Kemper 2007-02-08 00:17:39 +00:00
parent 83752373b9
commit 9daddf0116
2 changed files with 7 additions and 4 deletions

View File

@ -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]

View File

@ -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
}
}