提交 c3c965a6 编写于 作者: R Rémy Coutable

Merge branch 'sh-log-application-controller-exceptions-sentry' into 'master'

Log rescued exceptions to Sentry

See merge request !12638
......@@ -110,6 +110,8 @@ class ApplicationController < ActionController::Base
end
def log_exception(exception)
Raven.capture_exception(exception) if sentry_enabled?
application_trace = ActionDispatch::ExceptionWrapper.new(env, exception).application_trace
application_trace.map!{ |t| " #{t}\n" }
logger.error "\n#{exception.class.name} (#{exception.message}):\n#{application_trace.join}"
......
---
title: Log rescued exceptions to Sentry
merge_request:
author:
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册