How to log only 5xx errors on uWSGI

时光毁灭记忆、已成空白 提交于 2019-12-01 03:15:49

问题


I want to let uWSGI only logging server errors and avoid the normal requests logs, because the file grow very fast, and all the requests logging does NGINX very well for me.

How can I properly configurate my uwsgi.ini for that? The documentation is not very clear for me.


回答1:


Finally the solution was quite simple:

logto = /var/log/uwsgi/uwsgi.log
log-5xx = true
disable-logging = true

According to the help:

-L|--disable-logging disable request logging



来源:https://stackoverflow.com/questions/35694457/how-to-log-only-5xx-errors-on-uwsgi

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