Supervisor / supervisor

Supervisor process control system for Unix (supervisord)
http://supervisord.org
Other
8.33k stars 1.23k forks source link

It is possible to make supervisor logs to be in JSON format? #1624

Open Gelembjuk opened 5 months ago

Gelembjuk commented 5 months ago

I have the app where the supervisor is used. It is the docker container. My app managed by the supervisor outputs logs in JSON format. But when i view logs of that container i also see logs of the supervisor itself and it is not JSON.

Can i control format of supervisor logs?

Now i have something like this

# docker run ftp-engine:2402 
2024-02-05 08:34:22,987 INFO Set uid to user 0 succeeded
2024-02-05 08:34:22,992 INFO supervisord started with pid 19
2024-02-05 08:34:24,014 INFO spawned: 'cloudftp' with pid 20
2024-02-05 08:34:24,021 INFO spawned: 'cloudftps' with pid 21
{"context":{"process":20,"user":""},"channel":"default","datetime":"2024-02-05T08:34:24.000+0000","level_name":"CRITICAL","message":"Warning. \"tmpfolder\" in config file is /scratch/cloudftp But, such folder not exists! So, will be used /usr/ftpserver/tmp/"}
2024-02-05 08:34:24,628 INFO exited: cloudftp (exit status 255; not expected)
{"message":"Warning. \"tmpfolder\" in config file is /scratch/cloudftp But, such folder not exists! So, will be used /usr/ftpserver/tmp/","context":{"process":21,"user":""},"channel":"default","datetime":"2024-02-05T08:34:24.000+0000","level_name":"CRITICAL"}
2024-02-05 08:34:24,665 INFO gave up: cloudftp entered FATAL state, too many start retries too quickly
{"datetime":"2024-02-05T08:34:24.000+0000","channel":"ftpis","level_name":"CRITICAL","context":{"process":21,"user":""},"message":"FTPS server (implicit FTP over TLS) disabled by option disable_ftps!"}
2024-02-05 08:34:24,671 INFO exited: cloudftps (exit status 12; not expected)

any ay to change logs of supervisor to be same format as my app format?