[openstack-dev] [keystone] how to enable logging for unit tests

John Dennis jdennis at redhat.com
Fri Feb 28 21:30:54 UTC 2014


I'd like to enable debug logging while running some specific unit tests
and I've not been able to find the right combination of levers to pull
to get logging output on the console.

In keystone/etc/keystone.conf.sample (which is config file loaded for
the unit tests) I've set debug to True, I've verified CONF.debug is true
when the test executes. I've also tried setting log_file and log_dir to
see if I could get logging written to a log file instead, but no luck.

I have noticed when a test fails I'll see all the debug logging emitted
inbetween

{{{
}}}

which I think is something testtools is doing.

This leads me to the theory testtools is somehow consuming the logging
output. Is that correct?

How do I get the debug logging to show up on the console during a test run?

-- 
John



More information about the OpenStack-dev mailing list