Set some logger names explicitly
In the next patch we'll add documentation about what shade logs to what logging facilities. To make sure that those named facilities are maintained as part of the interface a consumer can count on, set non-root logger names explicitly. Also, this changes the logger name for the "waiting" messages from shade._utils to shade.iterate_timeout. _utils is an implemenation detail and such subject to change. The logger for it is not. Change-Id: I2ff413062c4cc3b49872fa8fd24e5daade063187
This commit is contained in:
parent
58d9b2a713
commit
f6c74f25f0
@ -48,7 +48,7 @@ def _iterate_timeout(timeout, message, wait=2):
|
||||
with <message>.
|
||||
|
||||
"""
|
||||
log = _log.setup_logging(__name__)
|
||||
log = _log.setup_logging('shade.iterate_timeout')
|
||||
|
||||
try:
|
||||
# None as a wait winds up flowing well in the per-resource cache
|
||||
|
@ -37,7 +37,7 @@ class OpenStackCloudException(Exception):
|
||||
|
||||
def log_error(self, logger=None):
|
||||
if not logger:
|
||||
logger = _log.setup_logging(__name__)
|
||||
logger = _log.setup_logging('shade.exc')
|
||||
if self.inner_exception and self.inner_exception[1]:
|
||||
logger.error(self.orig_message, exc_info=self.inner_exception)
|
||||
|
||||
|
@ -226,7 +226,7 @@ def generate_task_class(method, name, result_filter_cb):
|
||||
|
||||
|
||||
class TaskManager(object):
|
||||
log = _log.setup_logging(__name__)
|
||||
log = _log.setup_logging('shade.task_manager')
|
||||
|
||||
def __init__(
|
||||
self, client, name, result_filter_cb=None, workers=5, **kwargs):
|
||||
|
Loading…
x
Reference in New Issue
Block a user