提交 9daddf01 编写于 作者: J Jeremy Kemper

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
上级 83752373
*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]
......
......@@ -13,8 +13,9 @@ module Deprecation #:nodoc:
$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
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册