@@ -10,7 +10,7 @@ username=%(ENV_APPSMITH_SUPERVISOR_USER)s
1010password=%(ENV_APPSMITH_SUPERVISOR_PASSWORD)s
1111
1212[supervisord]
13- logfile=%(ENV_APPSMITH_LOG_DIR)s/supervisor/supervisord .log ; (main log file;default $CWD/supervisord.log)
13+ logfile=%(ENV_APPSMITH_LOG_DIR)s/supervisor/%(ENV_HOSTNAME)s-stdout .log ; (main log file;default $CWD/supervisord.log)
1414pidfile=%(ENV_TMP)s/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
1515childlogdir=%(ENV_APPSMITH_LOG_DIR)s/supervisor ; ('AUTO' child log dir, default $TEMP)
1616stdout_logfile_maxbytes = 0
@@ -35,13 +35,12 @@ serverurl=unix://%(ENV_TMP)s/supervisor.sock ; use a unix:// URL for a unix soc
3535files = %(ENV_SUPERVISORD_CONF_TARGET)s/*.conf
3636
3737[eventlistener:stdout]
38+ # This eventlistener sends logs to the python handler in /usr/lib/python3/dist-packages/supervisor/appsmith_supervisor_stdout.py created in this repo
39+ # It sends logs for individual processes to stdout/stderr of the main process, which lets logging pipelines to capture logs from each process.
40+ # Supervisor then wants to send these messages to a logfile by default, so directing them to /dev/null prevents double logging.
3841command = python3 -m supervisor.appsmith_supervisor_stdout
3942buffer_size = 10000
4043events = PROCESS_LOG
4144result_handler = supervisor.appsmith_supervisor_stdout:event_handler
42- stdout_logfile=%(ENV_APPSMITH_LOG_DIR)s/supervisor/access-supervisor-%(ENV_HOSTNAME)s.log
43- stderr_logfile=%(ENV_APPSMITH_LOG_DIR)s/supervisor/error-supervisor-%(ENV_HOSTNAME)s.log
44- stdout_logfile_maxbytes=10MB
45- stderr_logfile_maxbytes=10MB
46- stdout_logfile_backups=10
47- stderr_logfile_backups=10
45+ stdout_logfile=/dev/null
46+ stderr_logfile=/dev/null
0 commit comments