Comment 1 for bug 1788119

Revision history for this message
Ken Giusti (kgiusti) wrote :

Your observations are correct.

I talked a bit with Doug Hellman regarding what you're seeing. Way back we 'de-namespaced' the modules such that "oslo.messaging" became "oslo_messaging". This created problems for folks that had "oslo.messaging=<WHATEVER>" in their default_log_levels setting since the module name changed to 'oslo_messaging' and their log setting were being ignored.

To help fix that a workaround was added to oslo.log:

http://git.openstack.org/cgit/openstack/oslo.log/tree/oslo_log/log.py#n446

So whenever oslo_log's getLogger is called it converts the name "oslo_messaging" to "oslo.messaging". However as you noticed some of the oslo.messaging files use the python library's getLogger, which doesn't do the translation and will not filter based on "oslo.messaging=<WHATEVER>"

So this is indeed a bug in oslo.messaging (as far as I'm concerned).

Workaround: include both "oslo.messaging=<WHATEVER>" and "oslo_messaging=<WHATEVER>" in your default_log_levels (note the '_' vs '.')