This commit is contained in:
parent
dd7b693c0b
commit
9896c0dff0
@ -8,7 +8,7 @@ from urllib.request import Request, urlopen
|
|||||||
from urllib.error import URLError
|
from urllib.error import URLError
|
||||||
|
|
||||||
LOG_CENTER_URL = os.getenv('LOG_CENTER_URL', 'https://qiyuan-log-center-api.airlabs.art')
|
LOG_CENTER_URL = os.getenv('LOG_CENTER_URL', 'https://qiyuan-log-center-api.airlabs.art')
|
||||||
LOG_CENTER_ENABLED = os.getenv('LOG_CENTER_ENABLED', 'true').lower() in ('true', '1', 'yes')
|
LOG_CENTER_ENABLED = os.getenv('LOG_CENTER_ENABLED', 'false').lower() in ('true', '1', 'yes')
|
||||||
PROJECT_ID = 'video_backend'
|
PROJECT_ID = 'video_backend'
|
||||||
ENVIRONMENT = os.getenv('ENVIRONMENT', 'development')
|
ENVIRONMENT = os.getenv('ENVIRONMENT', 'development')
|
||||||
|
|
||||||
@ -30,7 +30,7 @@ def report_error(exc, context=None):
|
|||||||
'message': str(exc),
|
'message': str(exc),
|
||||||
'file_path': last_frame.filename if last_frame else 'unknown',
|
'file_path': last_frame.filename if last_frame else 'unknown',
|
||||||
'line_number': last_frame.lineno if last_frame else 0,
|
'line_number': last_frame.lineno if last_frame else 0,
|
||||||
'stack_trace': traceback.format_exception(exc),
|
'stack_trace': ''.join(traceback.format_exception(exc)),
|
||||||
},
|
},
|
||||||
'context': context or {},
|
'context': context or {},
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user