I have just installed my first uWSGI server on EC2 Ubuntu 14.04 LTS, using the following configuration:
[uwsgi]
http-socket = :9001
plugin = python
wsgi-file = foo.wsgi
chdir = /home/bar
process = 3
The uWSGI container works fine, but has no logging. Following the manual, I've added the following:
logger = file:/tmp/errlog
But restarting (using sudo service uwsgi restart
) did not work - the server would not start with this configuration.
Any idea what's missing from my ini
configuration?
Logging to sockets will send log entries to the Unix socket /tmp/uwsgi.
Post-buffering mode (uWSGI >= 2.0. This means that as soon as the uwsgi packet (read: the request headers) is parsed, it is forwarded to the backend/backends. Now, if your web-proxy is a streaming-one too (like apache, or the uWSGI http router), your app could be blocked for ages in case of a request with a body.
uWSGI includes an HTTP/HTTPS router/proxy/load-balancer that can forward requests to uWSGI workers. The server can be used in two ways: embedded and standalone. In embedded mode, it will automatically spawn workers and setup the communication socket.
If you change uwsgi systemd service file, reload the daemon and restart the process by typing: sudo systemctl daemon-reload. sudo systemctl restart uwsgi.
The "common" syntax is "logto = file".
The logger option is used for advanced plugins, if you want to use the 'file' one you have to load the logfile plugin (like you load the python one). But honestly if you only want to log to a file, logto will be more than enough
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