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 logging
logging.warning('Watch out!')
https://docs.python.org/3/howto/logging.html
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.sh
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0