加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

记录 – Supervisord不显示进程的stdout

发布时间:2020-12-16 03:34:58 所属栏目:安全 来源:网络整理
导读:尝试使用docker中的主管捕获我的应用程序的日志. 这是我的supervisord.conf: [supervisord]logfile=/dev/nullnodaemon=true[program:autofs]command=automount -fredirect_stderr=truestdout_logfile=/dev/stdoutstdout_logfile_maxbytes=0[program:split-p

尝试使用docker中的主管捕获我的应用程序的日志.

这是我的supervisord.conf:

[supervisord]
logfile=/dev/null
nodaemon=true

[program:autofs]
command=automount -f
redirect_stderr=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0

[program:split-pdf]
command=bin/split-pdf-server
directory=/root/split-pdf
redirect_stderr=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0

启动容器后一切正常,我可以看到我的应用程序运行的结果(它在网络共享上创建pdf文件)

但是日志显示我的应用没有输出:

015-07-02 00:39:26,119 CRIT Supervisor running as root (no user in config file)
2015-07-02 00:39:26,124 INFO supervisord started with pid 5
2015-07-02 00:39:27,127 INFO spawned: 'split-pdf' with pid 8
2015-07-02 00:39:27,130 INFO spawned: 'autofs' with pid 9
2015-07-02 00:39:28,132 INFO success: split-pdf entered RUNNING state,process has stayed up for > than 1 seconds (startsecs)
2015-07-02 00:39:28,132 INFO success: autofs entered RUNNING state,process has stayed up for > than 1 seconds (startsecs)

这是我在附加到docker容器时看到的唯一输出.

我在ubuntu 15.04 docker 1.7.0上

这不是this question的副本,因为我在容器中运行多个进程.

事实证明一切正常,但有一些延迟.
当我尝试为其他应用程序创建容器以生成更多日志消息时,消息开始出现在日志文件中,但有延迟.

我测试的第一个应用程序在日志中每个任务只有2行,我想在开始刷新到日志文件之前需要填充某种缓冲区.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读