我们可以将Substisord's stdout_logfile作为命名的管子文件而改为普通文件吗?

发布于 2025-02-10 13:36:05 字数 355 浏览 2 评论 0原文

我正在探索主管,需要将日志重定向到文件。我可以通过简单的配置来实现此目标,但我希望将命名的管子文件用于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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

死开点丶别碍眼 2025-02-17 13:36:05

我进行了一个简单的测试,发现主管用常规文件覆盖了指定的文件(FIFO)。

复制的步骤:

  1. 使用命令 - >创建一个FIFO文件。 mkfifo file_path

  2. 使用主管运行一些程序,然后将日志重定向到创建的FIFO文件

  3. 命令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:

  1. Create a FIFO file with command -> mkfifo file_path

  2. Run some program with supervisored and redirect the log to created FIFO file

  3. Validate the file type by command ls -l

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文