log_error(exception)
private
This is the same logging logic as in ShowExceptions middleware. TODO Once
“exceptron” is in, refactor this piece to simply re-use exceptron.
# File actionview/lib/action_view/renderer/streaming_template_renderer.rb, line 32
def log_error(exception) #:nodoc:
logger = ActionView::Base.logger
return unless logger
message = "\n#{exception.class} (#{exception.message}):\n"
message << exception.annoted_source_code.to_s if exception.respond_to?(:annoted_source_code)
message << " " << exception.backtrace.join("\n ")
logger.fatal("#{message}\n\n")
end