Reputation: 1431
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
Upvotes: 1
Views: 4003
Reputation: 304
I think there's a 'sudo supervisorctl tail -f tracker_asgi_workers' (same with starting or stopping 1 service
Upvotes: 0
Reputation: 420
You can also print them on your terminal and see what will happen in real time:
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stdout
stderr_logfile_maxbytes=0
Upvotes: 1
Reputation: 6608
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
Upvotes: 1