gpt4 book ai didi

python - 哪个记录器在gunicorn 中输出这个?

转载 作者:行者123 更新时间:2023-12-01 08:48:14 24 4
gpt4 key购买 nike

当我启动 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包设置记录器(传播)似乎不会影响它。我应该配置哪个模块来修改这些消息?

最佳答案

这些消息由 gunicorn/arbiter.py 中的 Arbiter 类输出,但您尝试执行的任何配置可能会被 Gunicorn 的机器覆盖,或者不适用 - 例如,尝试在工作人员中设置日志记录不会影响仲裁程序的操作,因为它们是单独的进程。因此,如果您想影响仲裁器的日志记录,或者修改用于仲裁器的gunicorn配置,您可能需要以特殊方式调用仲裁器(即不仅仅是通过运行预装的gunicorn脚本)。

关于python - 哪个记录器在gunicorn 中输出这个?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53229735/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com