如何禁用 Django 和 uWSGI 中的请求日志记录?
How to disable request logging in Django and uWSGI?
对于每个请求,我的 uWSGI 日志都充满了这样的条目:
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。如何禁用请求日志记录?
你的 uwsgi.ini
长什么样?这就是您要禁用日志记录的地方。
设置:disable-logging=True
这是文档:
http://uwsgi-docs.readthedocs.org/en/latest/Options.html#disable-logging
或从控制台使用:
uwsgi --disable-logging
对于每个请求,我的 uWSGI 日志都充满了这样的条目:
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。如何禁用请求日志记录?
你的 uwsgi.ini
长什么样?这就是您要禁用日志记录的地方。
设置:disable-logging=True
这是文档:
http://uwsgi-docs.readthedocs.org/en/latest/Options.html#disable-logging
或从控制台使用:
uwsgi --disable-logging