如何禁用Django和uWSGI中的请求日志记录? [英] How to disable request logging in Django and uWSGI?
问题描述
我的uWSGI日志中充满了每个请求的类似条目:
My uWSGI logs are full of entries like this for every request:
localhost [pid:4029 | app:0 | req:1/1] 127.0.0.1(){48 vars in 906个字节} [2016年3月23日星期三18:35:38] GET/=>在以下位置生成了94847个字节1137毫秒(HTTP/1.1 200)224个字节中的4个标头(核心上有1个开关)0)
localhost [pid: 4029|app: 0|req: 1/1] 127.0.0.1 () {48 vars in 906 bytes} [Wed Mar 23 18:35:38 2016] GET / => generated 94847 bytes in 1137 msecs (HTTP/1.1 200) 4 headers in 224 bytes (1 switches on core 0)
我不确定是uWSGI向他们发送垃圾邮件还是Django.如何禁用请求日志记录?
I'm not sure if it's uWSGI spamming them or Django. How can I disable the request logging?
推荐答案
您的 uwsgi.ini
是什么样的?那就是您要禁用日志记录的地方.
What does your uwsgi.ini
look like? That's where you'd want to disable logging.
设置: disable-logging = True
这是文档:
http://uwsgi-docs.readthedocs.org/zh_CN/latest/Options.html#disable-logging
这篇关于如何禁用Django和uWSGI中的请求日志记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!