newrelic: refactor error logging.

* Factor out New Relic logging to DanbooruLogger class.
* Log all exceptions to New Relic, not just statement timeouts.
This commit is contained in:
evazion
2019-08-08 22:16:39 -05:00
parent 35dfc704bc
commit 9a6add9730
9 changed files with 27 additions and 37 deletions

View File

@@ -56,10 +56,7 @@ class PopularSearchService
data
rescue => e
Rails.logger.error(e.to_s)
if defined?(NewRelic)
NewRelic::Agent.notice_error(e)
end
DanbooruLogger.log(e)
return []
end
end