Following this tutorial I've just setup nginx with uWSGI to serve my website which I built in Flask, and things work fine for now.
I sometimes want to debug something for which I normally use basic print
statements in the code. Unfortunately I have no idea where the result of these print's go?
I've tailed the following log files, but I don't see the print's in there:
/var/log/uwsgi/emperor.log
/var/log/uwsgi/myapp_uwsgi.log
/var/log/nginx/access.log
/var/log/nginx/error.log
Does anybody know where I can see the result of the prints?
normal print goes on stdout and Nginx log only stderr.
You should use the app.logger module of flask instead. Have a look at the flask documentation on error handling
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