With my Procfile like this:
web: gunicorn app:app --bind "$HOST:$PORT" --debug --error-logfile "-" --enable-stdio-inheritance --reload --log-level "debug"
is it in any way possible to get python print statements to be logged to stdout / bash? I am using the bottle framework here as well, if that affects anything.
print
bottle
In python 3, adding flush=True in each print statement works for my flask/gunicorn app.
flush=True
E.g.
gunicorn --bind 0.0.0.0:8080 server --log-level debug
No particular flags are required.
See if this helps.
2.1m questions
2.1m answers
60 comments
56.8k users