Supervisor / supervisor

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

Ability to reopen log(s) #1609

Closed npelov closed 1 year ago

npelov commented 1 year 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 1 year ago

Duplicate of #273

mnaberez commented 1 year ago

supervisord will reopen its logfiles if it receives SIGUSR2.

273 is a request for a command to trigger rotation.