mozilla-services/circus — pull request #724 by wynnw (2014-01-31 23:23:07+00:00)
Title: Feature/watched file handler

This pull request is focused on allowing a circus environment to work better with an external log rotation utility. I've got a mix of processes from different languages and different logging libraries, and it's a lot easier to get all of them to work with an external log rotation utility than to get all the logging libraries to do automatic log rotation.

The new WatchedFileStream makes all the stdout/stderr streams work that way, and using the WatchedFileHandler makes the circusd logs work better.

This also contains a fix for the reap message to make it so that a plugin watching for reap messages can distinguish between a non-zero exit and a signal'd exit by following the same pattern that the builtin Python Popen.returncode uses to distinguish between the two.

All tests are passing for me and I've tested the new functionality hard with my projects, so it should be very stable. The docs have been updated as well.