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.
Basic logging The most basic form of logging in uWSGI is writing requests, errors, and informational messages to stdout/stderr. This happens in the default configuration. The most basic form of log redirection is the --logto / --logto2 / --daemonize options which allow you to redirect logs to files.
harakiri. A feature of uWSGI that aborts workers that are serving requests for an excessively long time. Configured using the harakiri family of options. Every request that will take longer than the seconds specified in the harakiri timeout will be dropped and the corresponding worker recycled.
You can dynamically tune or configure various aspects of the uWSGI server using special variables passed by the web server (or in general by a uwsgi compliant client). For Nginx, the uwsgi_param <name> <value>; directive is used.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With