尝试使用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的副本,因为我在容器中运行多个进程.