You can redirect the program’s stdout to supervisor’s stdout using the following configuration options:
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
Explanation:
- When a process opens
/dev/fd/1(which is the same as/proc/self/fd/1), the system actually clones file descriptor #1 (stdout) of that process. Using this asstdout_logfiletherefore causessupervisordto redirect the program’s stdout to its own stdout. stdout_logfile_maxbytes=0disables log file rotation which is obviously not meaningful for stdout. Not specifying this option will result in an error because the default value is 50MB and supervisor is not smart enough to detect that the specified log file is not a regular file.
For more information:
http://veithen.github.io/2015/01/08/supervisord-redirecting-stdout.html