Ger*_*ens 7 supervisord docker
[supervisord]
nodaemon=true
logfile=/dev/stdout
pidfile=/var/run/supervisord.pid
childlogdir=/var/log/supervisor
Run Code Online (Sandbox Code Playgroud)
当我这样做时,主管会崩溃,因为它无法在/ dev/stdout中寻找
如何禁用supervisord在docker容器中创建任何日志文件?
Mat*_*att 14
对于主管,nodaemon会导致日志转到stdout
[supervisord]
nodaemon=true
logfile=/dev/null
logfile_maxbytes=0
Run Code Online (Sandbox Code Playgroud)
然后将每个托管进程的日志发送到stdout文件描述符 /dev/fd/1
[program:x]
command=echo test
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
redirect_stderr=true
Run Code Online (Sandbox Code Playgroud)
或者如果您希望将stderr保留在不同的流上:
[program:x]
command=echo test
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
stderr_logfile=/dev/fd/2
stderr_logfile_maxbytes=0
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3995 次 |
| 最近记录: |