Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to separate logs of uWSGI?

Tags:

uwsgi

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.

like image 984
sharvil_parekh Avatar asked Oct 29 '15 09:10

sharvil_parekh


1 Answers

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

like image 90
Freek Wiekmeijer Avatar answered Oct 18 '22 17:10

Freek Wiekmeijer