Python - Supervisor how to log the standard output -
Python output is buffered, use this after print
sys.stdout.flush()
or (Python 3)
print(something, flush=True)
or better
import logginglogging.warning('Watch out!')
You can also install a stdout friendly version using pip install supervisor-stdout
. Find the usage instructions here.
UPDATE:you can also update your supervisord.conf
to point the output to stdout.
[program:worker2]command=bash yourscript.shstdout_logfile=/dev/stdoutstdout_logfile_maxbytes=0