Best practice for log.debug and its ilk is to defer the formatting to the logging module itself.  It accepts %-style formatting.  In this case, it would also solve the unicode issues without an explicit encode on our part.