最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【未解决】supervisord的普通stdout的log却输出到表示错误的stderr的log中

supervisor crifan 5654浏览 0评论

折腾:

【已解决】Mac本地用supervisor去管理gunicorn的Python3的Flask

期间,虽然已经可以正常运行Flask了,但是对应的supervisord的log:

生成了supervisord的log文件了:

但是奇怪的是:

out中是空的

err的log中,倒是有正常的log输出:

感觉有点怪异啊

supervisord log stderr  stdout

Logging — Supervisor 3.3.4 documentation

How to redirect stdout from child processes to supervisord

allow forwarding stderr/stdout of all child processes to the main stderr/stdout of the supervisord process · Issue #511 · Supervisor/supervisor

disable supervisor logs to stdout/stderr · Issue #661 · Supervisor/supervisor

Supervisord and stdout/stderr – Server Fault

没搞懂

换个思路去找找:

supervisord   stdout log empty

supervisor   stdout log empty

python – supervisord logs don’t show my output – Stack Overflow

stdout not being captured · Issue #13 · Supervisor/supervisor

docker – Supervisor is not collect logs from application when WARN loglevel enabled – Stack Overflow

logging – supervisor does not write more log – Stack Overflow

supervisor creates useless empty stderr log files with redirect_stderr=True · Issue #282 · Supervisor/supervisor

加上

redirect_stderr=true

去试试:

结果:

【已解决】supervisor去启动gunicorn的Flask出错:supervisor couldn’t setuid to 0 Can’t drop privilege as nonroot user

【总结】

最终,此处没有找到原因,没有搞懂:

为何supervisord的配置

supervisord.conf

中写成:

<code>stdout_logfile=/Users/crifan/dev/dev_root/company/naturling/projects/robotDemo/logs/supervisord_out.log
stderr_logfile=/Users/crifan/dev/dev_root/company/naturling/projects/robotDemo/logs/supervisord_err.log
</code>

但是:

本应输出标准输出的supervisord_out.log:却是空的

而本应输出错误的:supervisord_err.log:却输出了标准输出的日志信息

转载请注明:在路上 » 【未解决】supervisord的普通stdout的log却输出到表示错误的stderr的log中

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
82 queries in 0.186 seconds, using 22.19MB memory