mperham/sidekiq — pull request #1467 by ctaintor (2014-02-07 21:36:36+00:00)
Title: USR2 will now reopen *all* log files (like Unicorn)

Addresses issue #1163.

This basically copies the code from Unicorn for reopening log files to better handle logrotate being used without `copytruncate`. This means that if someone was writing to Rails.logger (for instance), when a USR2 signal is sent to Sidekiq, the log file for Rails.logger will get reopened at the same time as the log file for Sidekiq. As it is now, a USR2 will only reopen the Sidekiq log file, leaving the Rails logger writing to a file handle that will eventually be rotated out.

Also, this works by calling [IO#reopen](http://ruby-doc.org/core-1.9.3/IO.html#method-i-reopen) rather than recreating a new Logger/File object.

Note that if this is accepted, the [Signal documentation](https://github.com/mperham/sidekiq/wiki/Signals) should also be uploaded.