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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user