How to separate logs of uWSGI?

别来无恙 提交于 2019-12-10 04:24:43

问题


I want to separate the logs of uwsgi like access logs, request logs, error logs in individual files. At the moment these all are in same file and not well formatted.


回答1:


There are configuration directives to specify different loggers for requests and all other messages: logger and req-logger. Example:

# uwsgi.ini
req-logger = file:/var/log/uwsgi/uwsgi-req.log
logger = file:/var/log/uwsgi/uwsgi.log

If you want nondefault formatting, filtering or a peculiar output location, you could write your own logging plugin. Here's a link the relevant page: http://uwsgi-docs.readthedocs.org/en/latest/Logging.html



来源:https://stackoverflow.com/questions/33410122/how-to-separate-logs-of-uwsgi

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