Merge branch 'master' into asset-pipeline
Conflicts: static/js/application.js
This commit is contained in:
14
lib/newrelic_logging/__init__.py
Normal file
14
lib/newrelic_logging/__init__.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import newrelic.agent
|
||||
|
||||
import logging
|
||||
|
||||
class NewRelicHandler(logging.Handler):
|
||||
def emit(self, record):
|
||||
if record.exc_info is not None:
|
||||
params = record.__dict__
|
||||
params['log_message'] = record.getMessage()
|
||||
|
||||
newrelic.agent.record_exception(
|
||||
*record.exc_info,
|
||||
params=params
|
||||
)
|
||||
@@ -1,7 +0,0 @@
|
||||
import newrelic.agent
|
||||
import sys
|
||||
|
||||
def record_exception(logger, msg, params={}, ignore_errors=[]):
|
||||
logger.exception(msg)
|
||||
newrelic.agent.record_exception(*sys.exc_info())
|
||||
|
||||
Reference in New Issue
Block a user