Hello Render Team,
I’m deploying a Flask backend application on Render using gunicorn as the WSGI server.
While HTTP request logs (access logs) are correctly displayed in the Render log streams, log messages generated inside Flask route handlers are not appearing.
I’ve tried various approaches to solve this issue: Using Python’s logging module with console and file handlers configured at DEBUG level Directly using print(), sys.stdout.write(), sys.stderr.write() with flush=True Setting the PYTHONUNBUFFERED=1 environment variable Adding gunicorn options in Procfile: --log-file=- --access-logfile=- --error-logfile=- --capture-output --enable-stdio-inheritance --preload Creating a custom gunicorn configuration file with worker lifecycle hooks Despite these efforts, I can only see access logs in Render’s log streams, but none of the application-level logs from inside route handlers
. Is there a specific configuration required for Render to capture logs from Flask worker processes? Are there any known issues with capturing stdout/stderr from gunicorn worker processes in Render’s log streams?
Any guidance would be greatly appreciated.
thx