4
我试图与tornado.web.Application._handle_request_exception
方法的覆盖来实现自定义的未处理请求的异常记录:如何在Tornado中设置自定义未处理的异常处理程序?
def _handle_request_exception(self, e):
logging.error('error') # Just for test.
但我看到类似日志输出相同:
2012-09-01 03:35:09,947 [7399] root ERROR: Uncaught exception GET/(127.0.0.1)
HTTPRequest(...)
Traceback (most recent call last):
,而不是我的自定义消息。我究竟做错了什么?
谢谢,我的错误是重写'Application'类中的方法而不是'RequestHandler'。 – eigenein