首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Django-活塞使活塞返回异常的完全溯源

Django-活塞使活塞返回异常的完全溯源
EN

Stack Overflow用户
提问于 2013-01-07 23:27:25
回答 1查看 180关注 0票数 0

如何使活塞返回完整的异常回溯。默认情况下,它只返回最后一个错误文本。喜欢

代码语言:javascript
复制
id() takes exactly one argument (0 given)

需要知道哪个文件和哪一行...

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-01-07 23:48:25

活塞通过utils.rc加载http状态响应,不会引发错误。

从文档中:

代码语言:javascript
复制
Configuration variables
Piston is configurable in a couple of ways, which allows more granular 
control of some areas without editing the code.

Setting                         Meaning
settings.PISTON_EMAIL_ERRORS    If (when) Piston crashes, it will email the 
                                administrators a backtrace (like the Django one
                                you see during DEBUG = True)
settings.PISTON_DISPLAY_ERRORS  Upon crashing, will display a small backtrace 
                                to the client, including the method signature 
                                expected.
settings.PISTON_STREAM_OUTPUT   When enabled, Piston will instruct Django to 
                                stream the output to the client, but please read
                                streaming before enabling it.

我建议设置一个日志记录器,结合使用sentryraven是相当方便的,您可以配置自己的日志级别和处理程序。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14198865

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档