Incorrect loggers level configuration in oslo projects
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo.log |
Invalid
|
Undecided
|
Kirill Bespalov |
Bug Description
The getLogger(__name__) method of log.py module in oslo_log
maintain old oslo loggers names by replacing a non-namespaced
prefix 'oslo_x' of module name with 'oslo.x'. It still allow
configuring a logging level of any oslo module with old style
namespaced name.
For example the default log level of oslo messaging:
'oslo.
However, many oslo libraries use direct import of python
loggging module, that knows nothing about oslo prefix and
create loggers with original non-namespaced module name (oslo_x).
Examples of suchlike importing you can find here:
1)direct py logging:
oslo_
2)oslo.log:
oslo_
It means that after initialization will be created two types
of loggers: oslo_messaging.x and oslo.messaging.y. For
oslo.messaging.y loggers default log level can be applied,
for oslo_messaging.x not and their log lever will be 0, that
making them dependent on the root log level of logger.
Possible solution:
1) fix the setup log method in oslo_log to allow detect
both log level configuration naming styles: oslo_x and oslo.x
2) remove useless loggers name renaming in the getLogger method
3) remove all oslo_log usages in oslo.messaging. It is library,
not standalone project or an application and should not depends on the oslo_log.
Changed in oslo.log: | |
assignee: | nobody → Kirill Bespalov (k-besplv) |
description: | updated |
Changed in oslo.log: | |
status: | In Progress → New |
Changed in oslo.log: | |
status: | Incomplete → Invalid |
status: | Invalid → Won't Fix |
status: | Won't Fix → Invalid |
Proof of the bug. After initialization we have two different sets of loggers.
One with default log level, other with 0 level.