djangoubuntusupervisord

See supervisor executions in console rather than a logfile


Right now when i do sudo supervisorctl restart all all programs restart.Then whatever has been executed by program tracker_asgi_workers is written into worker.log file. I want to see executions in command line prompt in real time like we see when we do python manage.py runserver. What value should i assign to stdout_logfile variable ?

[program:tracker_asgi_workers]
command=/home/datasleek/trackervenv/bin/python /home/datasleek/tracker/manage.py runworker
stdout_logfile = /home/datasleek/tracker/logs/worker.log
process_name=asgi_worker%(process_num)s
numprocs=8
environment=LANG=en_US.UTF-8,LC_ALL=en_US.UTF-8                        ; Set UTF-8 as default encoding
autostart=true
autorestart=true
redirect_stderr=True
stopasgroup=true

Solution

  • I think you can't do it easily because supervisor processes are meant to run in background. However you can print outputs to log file on console in realtime.

    Start process managed by supervisor just as normally you do, and run this command to see real time output on console.

     tail -f /home/datasleek/tracker/logs/worker.log