diff --git a/nova/debugger.py b/nova/debugger.py index de228f9555b6..a735775c1a05 100644 --- a/nova/debugger.py +++ b/nova/debugger.py @@ -37,8 +37,8 @@ def init(): if not (CONF.remote_debug.host and CONF.remote_debug.port): return - import logging from nova.i18n import _LW + from oslo_log import log as logging LOG = logging.getLogger(__name__) LOG.debug('Listening on %(host)s:%(port)s for debug connection', diff --git a/nova/policy.py b/nova/policy.py index 8cde01607f53..275a1d22a24b 100644 --- a/nova/policy.py +++ b/nova/policy.py @@ -15,9 +15,8 @@ """Policy Engine For Nova.""" -import logging - from oslo_config import cfg +from oslo_log import log as logging from oslo_policy import policy from oslo_utils import excutils diff --git a/nova/tests/unit/test_utils.py b/nova/tests/unit/test_utils.py index 83b41a15b3ec..699f81287deb 100644 --- a/nova/tests/unit/test_utils.py +++ b/nova/tests/unit/test_utils.py @@ -15,7 +15,6 @@ import datetime import hashlib import importlib -import logging import os import os.path import socket @@ -29,6 +28,7 @@ from oslo_concurrency import processutils from oslo_config import cfg from oslo_context import context as common_context from oslo_context import fixture as context_fixture +from oslo_log import log as logging from oslo_utils import encodeutils from oslo_utils import fixture as utils_fixture from oslo_utils import units diff --git a/nova/utils.py b/nova/utils.py index 83e5f6e0eefb..637b0694011c 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -24,7 +24,6 @@ import errno import functools import hashlib import inspect -import logging as std_logging import os import pyclbr import random @@ -215,7 +214,7 @@ class RootwrapDaemonHelper(RootwrapProcessHelper): # rootwrap to honor the same set of flags in kwargs and to ensure # that we don't regress any current behavior. cmd = [str(c) for c in cmd] - loglevel = kwargs.pop('loglevel', std_logging.DEBUG) + loglevel = kwargs.pop('loglevel', logging.DEBUG) log_errors = kwargs.pop('log_errors', None) process_input = kwargs.pop('process_input', None) delay_on_retry = kwargs.pop('delay_on_retry', True) diff --git a/nova/version.py b/nova/version.py index 9f4205f5d716..f6780435bd21 100644 --- a/nova/version.py +++ b/nova/version.py @@ -33,7 +33,7 @@ def _load_config(): from oslo_config import cfg - import logging + from oslo_log import log as logging global loaded, NOVA_VENDOR, NOVA_PRODUCT, NOVA_PACKAGE if loaded: