【发布时间】:2017-06-27 02:50:04
【问题描述】:
我的 Flask 应用程序在 Gunicorn 上运行,Nginx 作为反向代理。我有以下日志记录代码:
app.logger.error("This is an error")
app.logger.info("This is an info")
我用以下参数执行了我的 gunicorn
gunicorn --log-file /home/ubuntu/myproject/logs/gunicorn.log --log-level DEBUG --workers 3 --bind unix:myproject.sock -m 007 wsgi:app
现在,当我执行我的例程时,我在 gunicorn.log 上收到错误消息(“这是一个错误”),但我在文件中没有看到任何消息(“这是一个信息”)。我可以知道如何解决这个问题吗?
【问题讨论】: