Capture python standard output running through gunicorn


I've got a flask app that gives me output like - - [27/Nov/2012 20:56:33] "GET / HTTP/1.1" 200 -

How do I get this written to a file? I know I could run python > blah.log, but how do I do the same thing with gunicorn running? Who is taking the output? I've noticed that looking at gunicorn's logs, it only has information about starting up and not about actual http requests.


11/28/2012 1:59:09 AM

Accepted Answer

Figured out my problem. The logging page on flask is what I'm looking for:

What I missed in reading this is that the errors are logged to a file only in production mode.

11/30/2012 11:27:41 AM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow