hongblue 发表于 2019-2-3 12:13:10

supervisord stdout_logfile 不生效解决办法

配置文件


command = /ebs_data/appenv3/bin/python xmpp_p2p_recv.pyc
process_name = p2p_recv_%(process_num)02d
numprocs = 1
directory = /ebs_data/im/rec/
priority = 20
stdout_logfile = /ebs_data/recv.out.log
stderr_logfile = /ebs_data/recv.err.log
autostart = true
autorestart = true
startsecs = 10
environment = PATH="/ebs_data/appenv3/bin:$PATH",TZ="UTC",
stopwaitsecs = 30
解决办法
  在command中添加-u参数,如下所示:

command = /ebs_data/appenv3/bin/python -u xmpp_p2p_recv.pyc
  或者
Flush each stream after writing like sys.stdout.flush() or run with the streams unbuffered using python -u.

参考链接
  github
stackoverflow



页: [1]
查看完整版本: supervisord stdout_logfile 不生效解决办法