I have a Django application working for uwsgi inside a Docker container. uwsgi launched through the ENTRYPOINT and CMD parameters in the Dockerfile. I successfully connect it to a separate Nginx container and check the expected results in the browser.
So far, so good.
Now I would like to see application logs in a Django container. But I can not find the right combination of Django settings for LOGGING variables and uwsgi switches. I just see the standard uwsgi logs which are useless to me.
Is it even possible? It seems to me that I should make some kind of BASH shell script, for example:
uwsgi --socket 0.0.0.0:80 --die-on-term --module myapp.wsgi:application --chdir /src --daemonize /dev/null tail -f /common.log'''
... set LOGGING inside Django to write to /common.log and /common.log to output it.
Is there a more elegant solution?
Updated 2016-02-24:
Yes it is possible. I made a mistake somewhere in my first tests. I posted a working example at https://github.com/msgre/uwsgi_logging .
msgre source share