Copy StandardLogging fixture from Nova
This code was originally written for Nova by Joe Gordon
<joe.gordon0@gmail.com> and Sean Dague <sean@dague.net>.
This enables debug logging that is exercised by unit test
runs to be handled and detect formatting errors. The debug
logging does not actually go to the console unless the
OS_DEBUG environment variable is set.
As a result, a few formatting errors are detected and
cleaned up with this change.
This also fixes a problem where debug logging from stevedore
is dumped to the console every time an extension is loaded,
which in a gate-cinder-python27 job is 65K+ times.
Change-Id: I989f9d591d1483a56a1bab3c20de583e85997562
Closes-Bug: #
1551325