当我开始使用Gunicorn时,它会打印以下内容:
[2018-11-09 16:30:20 +0000] [16] [INFO] Starting gunicorn 19.9.0
[2018-11-09 16:30:20 +0000] [16] [INFO] Listening at: http://0.0.0.0:8000 (16)
[2018-11-09 16:30:20 +0000] [16] [INFO] Using worker: sync
[2018-11-09 16:30:20 +0000] [19] [INFO] Booting worker with pid: 19
为gunicorn软件包设置一个记录器(正在传播)似乎没有影响。我应该配置哪个模块来修改这些消息?
答案 0 :(得分:0)
这些消息由Arbiter
中的gunicorn/arbiter.py
类输出,但可能是您尝试执行的任何配置都被gunicorn的机器所覆盖,或者不适用-例如,尝试设置登录工作线程不会影响仲裁程序的工作,因为它们是独立的过程。因此,如果您想影响日志记录或修改用于仲裁程序的gunicorn配置,则可能需要以特殊方式调用仲裁程序(即,不仅通过运行罐头gunicorn
脚本)。