提交 9b0ac0bc 编写于 作者: P Piotr Sarnacki

Use ActionView::Base.logger instead of AC::Base.logger

上级 45efb665
......@@ -30,7 +30,7 @@ def each(&block)
# This is the same logging logic as in ShowExceptions middleware.
# TODO Once "exceptron" is in, refactor this piece to simply re-use exceptron.
def log_error(exception) #:nodoc:
logger = ActionController::Base.logger
logger = ActionView::Base.logger
return unless logger
message = "\n#{exception.class} (#{exception.message}):\n"
......
......@@ -85,7 +85,7 @@ class StreamingTest < Rack::TestCase
test "rendering with template exception logs the exception" do
io = StringIO.new
_old, ActionController::Base.logger = ActionController::Base.logger, ActiveSupport::Logger.new(io)
_old, ActionView::Base.logger = ActionView::Base.logger, ActiveSupport::Logger.new(io)
begin
get "/render_streaming/basic/template_exception"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册