使用 Gunicorn 和 Flask 登录控制台查看传入请求

New*_*der 3 python flask gunicorn

启动后可以使用 Flask 查看传入的请求,例如 Flask 图像

有没有办法查看gunicorn 实时发出的请求?

Gre*_* Li 9

按照下面的方式运行Gunicorn,你将看到传入的请求日志:

$ gunicorn --workers 3 your_module:your_app --access-logfile -
Run Code Online (Sandbox Code Playgroud)