Supervisord with django writing separate logs for each program

652 Views Asked by At

I'm using supervisord (through django-supervisor a thin wrapper around supervisor) to run multiple processes with my Django installation. My problem is all the logs are written to the supervisord log file (in this example out.log) instead of the different log files.

the conf file (cleaned up):

[supervisord]
logfile=/var/log/server/ourserver/out.log


[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL  for a unix socket


[program:webserver]
command=uwsgi uwsgi.ini
stout_logfile = /var/log/server/ourserver/django.log
redirect_stderr = true
;autostart = true
;autorestart = true

[program:celery]
command=celery worker -B -A server.celery --loglevel=info --concurrency=4
;autostart = true
;autorestart = true
stout_logfile = /var/logs/server/ourserver/celery.log
redirect_stderr = true

[program:updater]
command=python -u updater.py
;directory=/home/ubuntu/server/ourserver
;autostart = true
;autorestart = true
stout_logfile = /var/logs/server/ourserver/updater.log
redirect_stderr = true
1

There are 1 best solutions below

0
On

replace stout_logfile with stdout_logfile