candlepin/subscription-manager — pull request #1078 by alikins (2014-11-19 17:18:34+00:00)
Title: 1147463: Log py.warnings to shutup gobject warning

On startup, we were always getting a gobject warning like:
/usr/lib64/python2.7/site-packages/gobject/__init__.py:115: Warning:
Attempt to add property subscription_manager+gui+widgets+CellRendererDate::date
after class was initialised
type_register(cls, namespace.get('__gtype_name__'))

This warning is spurious and has been removed in newer versions
of glib. See https://bugzilla.gnome.org/show_bug.cgi?id=698614

But warnings to stdout/stdout are not useful for a gui app
typically launched from desktop app launchers not a shell.
So use the "logging.captureWarnings" method to send those
warnings to the "py.warnings" log.

Add a PyWarningsLoggingFilter class to add a note about the
source of the log messages to the log msg, without changing the
current logging format.