Add python logging support, better message templates, and support for partially empty rings. svn:r12849