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.
In python 3, adding flush=True
in each print statement works for my flask/gunicorn app.
E.g.
gunicorn --bind 0.0.0.0:8080 server --log-level debug
No particular flags are required.
See if this helps.