Hello,
thanks for hints guys. I transform Brano’s reply to demo application: 
https://github.com/msgre/uwsgi_logging

As you could see Bastian, I used already prepared django logger 
(https://github.com/msgre/uwsgi_logging/blob/master/src/demo/app1/views.py) and 
now I am able to see application logs in container’s output (in my test I am 
using uwsgi 2.0).

Once again, thank you for useful informations.

Have a nice day
Michal
V 23. února 2016 na 16:29:40, Plovarna ([email protected]) napsáno:

Hello,
I am in the process of Dockerizing my Python application. I would like have 
container with uwsgi and my app behind. When somebody run container, it will 
launch uwsgi in foreground mode and with the help of nginx in other container I 
am able to communicate with my application.

So far, so good.

Next detail which I would like solve is logging. My idea is that stdout output 
from Docker will contain mix of log messages from uwsgi AND my application. I 
tried setup Python logging to StreamHandler (with messages sended to stdout and 
also stderr), but uwsgi don’t reproduce it on his stdout (I could se JUST uwsgi 
logs).

My questions are:

* Is it possible to setup uwsgi AND my Python app, that it will show mix of 
both log messages?
* Is it possible to setup uwsgi AND my Python app, that it will show JUST log 
messages from my application?

Right now uwsgi logs are useless for me (I have access logs from Nginx and I am 
missing logs from my app). I don’t want another piece of SW to be installed 
inside of Docker container just because log juggling.

Thank you for any hints

Regards
Michal
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to