Django使用apach记录请求

2024-09-28 17:25:22 发布

您现在位置:Python中文网/ 问答频道 /正文

我想记录每个进入Django的请求并保存到mongodb,就像这个示例一样 http://engineering.hackerearth.com/2015/02/26/logging-millions-requests-what-it-takes/

想叫这样的东西。在

# this creates a thread which collects required data and forwards
# it to the transporter cluster
run_async(log_request_async, request) 

我怎样才能在django请求内做到这一点呢。?有要调用runasync的示例吗?在


Tags: djangocomhttp示例asyncrequestmongodblogging