我在GAE中有一个使用python的项目,我在其中设置了rollbar来跟踪任何错误和异常。错误报告在本地主机上有效,但是一旦我部署了它,我的应用程序就不会发送我故意创建的任何错误日志/信息。
我将滚动条设置如下:
import rollbar
rollbar.init('xxxxxxxxxxxxxxxxxxxx', 'production')
..
..
#when an error occur
try:
....
except:
rollbar.report_exc_info()更新(11/20):
我现在可以让rollbar工作了,但不得不使用旧版本的requests库(2.3.0版)。较新的版本,如2.7.0或2.8.1会给我一个连接错误,谁知道为什么或如何解决?
ERROR 2015-11-20 17:44:03,543 __init__.py:1158] Exception while posting item ConnectionError(ProtocolError('Connection aborted.', error(13, 'Permission denied')),)
Traceback (most recent call last):
File "/Path/to/my/project/rollbar/__init__.py", line 1156, in _send_payload
_post_api('item/', payload, access_token=access_token)
File "/Path/to/my/project/rollbar/__init__.py", line 1197, in _post_api
verify=SETTINGS.get('verify_https', True))
File "/Path/to/my/project/requests/api.py", line 109, in post
return request('post', url, data=data, json=json, **kwargs)
File "/Path/to/my/project/requests/api.py", line 50, in request
response = session.request(method=method, url=url, **kwargs)
File "/Path/to/my/project/requests/sessions.py", line 468, in request
resp = self.send(prep, **send_kwargs)
File "/Path/to/my/project/requests/sessions.py", line 576, in send
r = adapter.send(request, **kwargs)
File "/Path/to/my/project/requests/adapters.py", line 412, in send
raise ConnectionError(err, request=request)
ConnectionError: ('Connection aborted.', error(13, 'Permission denied'))发布于 2016-11-09 10:08:21
我在使用Rollbar和GAE时遇到了同样的问题,潜在的原因是我在本地以普通用户的身份运行Google App Engine,没有打开套接字的权限。当我把它部署到Google App Engine上时,它运行得很好。
https://stackoverflow.com/questions/33703620
复制相似问题