Supervisor / supervisor

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

Ability to reopen log(s) #1609

Closed npelov closed 8 months ago

npelov commented 8 months ago

Some log rotating functions are missing in supervisord. Since implementing all features is not really a viable option logrotate can be used to rotate logs. However there is no command to close and reopen logs to assist log rotation. for example a proper way to rotatelogs would be:

  1. (also rotate old logs)
  2. mv name.log name.log.1
  3. supervisorctl reopenlogs [process]

I thought reload would do that, but reload actually restarts all processes which is not always wanted behavior.

Technically this can be achieved with syslog, but this way you have to configure both logrotate and systlog which complicates things.

mnaberez commented 8 months ago

Duplicate of #273

mnaberez commented 8 months ago

supervisord will reopen its logfiles if it receives SIGUSR2.

273 is a request for a command to trigger rotation.