我们可以将Substisord's stdout_logfile作为命名的管子文件而改为普通文件吗?
我正在探索主管,需要将日志重定向到文件。我可以通过简单的配置来实现此目标,但我希望将命名的管子文件用于stdout_logfile字段而不是普通文件。
command={command}
priority=900
autorestart=true
startsecs=5
startretries=5
redirect_stderr=true
stdout_logfile=/tmp/raw.log
我知道/tmp/raw.log 文件是一个普通文件,但正在寻找一种方法用命名的管子文件(FIFO文件)替换此文件。
任何帮助,建议指针指向正确的文件都会有所帮助。
I am exploring supervisord and need to redirect logs to a file. I can achieve this with a simple config but I am looking to use named pipe file for stdout_logfile field instead a normal file.
command={command}
priority=900
autorestart=true
startsecs=5
startretries=5
redirect_stderr=true
stdout_logfile=/tmp/raw.log
I know /tmp/raw.log file is a normal file but looking for a way to replace this with a named pipe file (FIFO file).
Any help, suggestion pointer to a right document would be helpful.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我进行了一个简单的测试,发现主管用常规文件覆盖了指定的文件(FIFO)。
复制的步骤:
使用命令 - >创建一个FIFO文件。 mkfifo file_path
使用主管运行一些程序,然后将日志重定向到创建的FIFO文件
命令command ls -l </p>验证文件类型
I did a simple testing and found that supervisors overrides the named file (FIFO) with a regular file.
Steps to reproduce:
Create a FIFO file with command -> mkfifo file_path
Run some program with supervisored and redirect the log to created FIFO file
Validate the file type by command ls -l