I deleted a log file of one the managed processes (stdout). Supervisor is still writing the logs into it.
I want to recreate the log file right now, but I can't afford to restart the process (for example because I don't want downtime).
Is it possible to make Supervisor reopen logs for a process?
Another wish is to be able to tell Supervisor to reopen the log file(s) while the closed logs to be renamed.
This would be useful for backing up the logs. I would tell Supervisor to reopen the log and then would compress, back up and delete the old one. I need this because logrotate fails sometimes: gzip: stdin: file size changed while zipping. delaycompress option for logrotate doesn't suit me, because I need to clean disk space right now by reopening the logs and backing up the old ones, then deleting them.
So it's like stdout_logfile_maxbytes but on demand.
Is it possible to make Supervisor reopen logs for a process?
Please ask questions about using Supervisor on the supervisor-users mailing list. We use this issue tracker mainly for bugs in Supervisor itself.
Good Job@mnaberez
Most helpful comment
SIGUSR2Please ask questions about using Supervisor on the supervisor-users mailing list. We use this issue tracker mainly for bugs in Supervisor itself.