pulp/pulp — pull request #917 by bmbouter (2014-04-28 11:54:21+00:00)
Title: 1087015 - Capture warnings with the pulp logger

You can tell this code works because of how the pickle warning is reported on worker startup.

This comes with a new tests, but master currently has broken tests on it (unrelated to this PR).

You'll notice the Celery banner still is not captured, but [those use plain print statements](https://github.com/celery/celery/blob/master/celery/apps/worker.py#L168), so that is really a celery bug, not an issue with our logger.

Each redirected warning line is prepended with "py.warnings:WARNING: " which is ugly, but I don't know of a straightforward way of fixing that without hardcoding the removal of that string, which is probably not a good idea.