I\'m trying to save application log messages from a very simple flask app in a log file. While this works flawlessly when I\'m running the app with the embedded Flask server, it
Someone can search: how to see errors with Python
error stack when using Flask
with Gunicorn
.
Just set up the flag --error-logfile
to the file path where you want to see error stacks. Particularly (when using in Docker
) you can set it up in GUNICORN_CMD_ARGS
environment variable to the next value (an example):
--bind=0.0.0.0:8000 --access-logfile=/logs/rest.app/access.log --error-logfile=/logs/rest.app/error.log --capture-output --enable-stdio-inheritance