Django Sentry 在开发环境中报错
我在临时和生产环境中成功运行 django-sentry,但在我的开发实例上,sentry 似乎没有记录日志。
我正在使用管理运行服务器,当发生 500 错误时,我会在控制台中收到此消息:
Development server is running at http://192.168.56.100:8080/
Quit the server with CONTROL-C.
No handlers could be found for logger "sentry.errors"
[20/Apr/2011 17:26:56] "POST .... HTTP/1.1" 500 126470
我在 local_settings 中设置了以下内容:
DEBUG = True
SENTRY_TESTING = True
Google 搜索没有发现任何“无处理程序...”错误消息 - 任何想法?
I'm running django-sentry successfully in our staging and production environments, but on my development instance sentry doesn't appear to be logging.
I'm using manage runserver, and when a 500 error occurs I'm getting this in the console:
Development server is running at http://192.168.56.100:8080/
Quit the server with CONTROL-C.
No handlers could be found for logger "sentry.errors"
[20/Apr/2011 17:26:56] "POST .... HTTP/1.1" 500 126470
I've set the following in local_settings:
DEBUG = True
SENTRY_TESTING = True
Google searches have turned up nothing for the "No handlers..." error message - any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在不进行日志记录的开发盒上的 settings.py 中,添加如下内容:
因此,假设您在开发桌面上使用标准的 manage.py runserver,这将打开一个 StreamHandler() ,该 StreamHandler() 写入标准错误并你应该在你的控制台上看到。
您还可以更改 StreamHandler() ---> FileHandler("/tmp/debug.log", "w")
它记录到sentry.errors处理程序的事实表明您的开发哨兵配置/设置存在配置错误。
In your settings.py on your dev box that isn't logging, add something like this:
So assuming you're using the standard manage.py runserver on your development desktop, that will open a StreamHandler() which writes to standard error and you should see on your console.
You could also change StreamHandler() ---> FileHandler("/tmp/debug.log", "w")
The fact that it is logging to the sentry.errors handler says that there is a misconfiguration with your dev sentry configuration / settings.