Supervisor/supervisor

Ability to reopen log(s)

Closed this issue · 2 comments

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.

Duplicate of #273

supervisord will reopen its logfiles if it receives SIGUSR2.

#273 is a request for a command to trigger rotation.