How to disable request logging in Django and uWSGI?

与世无争的帅哥 提交于 2021-01-21 12:13:29

问题


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 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)

I'm not sure if it's uWSGI spamming them or Django. How can I disable the request logging?


回答1:


What does your uwsgi.ini look like? That's where you'd want to disable logging.

Set: disable-logging=True

Here's the docs:

http://uwsgi-docs.readthedocs.org/en/latest/Options.html#disable-logging




回答2:


Or from the console with:

uwsgi --disable-logging


来源:https://stackoverflow.com/questions/36186324/how-to-disable-request-logging-in-django-and-uwsgi

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!