Use oslo_log instead of logging

Some modules can be converted to use oslo_log instead of logging
lib.

Change-Id: I00a676ef266f47590f8c46d4a1a4eb876ab1f27d
This commit is contained in:
Zhihai Song 2015-12-25 15:56:14 +08:00 committed by Zhihai Song
parent e9b8f6da55
commit 6df327694f
5 changed files with 5 additions and 7 deletions

View File

@ -37,8 +37,8 @@ def init():
if not (CONF.remote_debug.host and CONF.remote_debug.port): if not (CONF.remote_debug.host and CONF.remote_debug.port):
return return
import logging
from nova.i18n import _LW from nova.i18n import _LW
from oslo_log import log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
LOG.debug('Listening on %(host)s:%(port)s for debug connection', LOG.debug('Listening on %(host)s:%(port)s for debug connection',

View File

@ -15,9 +15,8 @@
"""Policy Engine For Nova.""" """Policy Engine For Nova."""
import logging
from oslo_config import cfg from oslo_config import cfg
from oslo_log import log as logging
from oslo_policy import policy from oslo_policy import policy
from oslo_utils import excutils from oslo_utils import excutils

View File

@ -15,7 +15,6 @@
import datetime import datetime
import hashlib import hashlib
import importlib import importlib
import logging
import os import os
import os.path import os.path
import socket import socket
@ -29,6 +28,7 @@ from oslo_concurrency import processutils
from oslo_config import cfg from oslo_config import cfg
from oslo_context import context as common_context from oslo_context import context as common_context
from oslo_context import fixture as context_fixture from oslo_context import fixture as context_fixture
from oslo_log import log as logging
from oslo_utils import encodeutils from oslo_utils import encodeutils
from oslo_utils import fixture as utils_fixture from oslo_utils import fixture as utils_fixture
from oslo_utils import units from oslo_utils import units

View File

@ -24,7 +24,6 @@ import errno
import functools import functools
import hashlib import hashlib
import inspect import inspect
import logging as std_logging
import os import os
import pyclbr import pyclbr
import random import random
@ -215,7 +214,7 @@ class RootwrapDaemonHelper(RootwrapProcessHelper):
# rootwrap to honor the same set of flags in kwargs and to ensure # rootwrap to honor the same set of flags in kwargs and to ensure
# that we don't regress any current behavior. # that we don't regress any current behavior.
cmd = [str(c) for c in cmd] 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) log_errors = kwargs.pop('log_errors', None)
process_input = kwargs.pop('process_input', None) process_input = kwargs.pop('process_input', None)
delay_on_retry = kwargs.pop('delay_on_retry', True) delay_on_retry = kwargs.pop('delay_on_retry', True)

View File

@ -33,7 +33,7 @@ def _load_config():
from oslo_config import cfg from oslo_config import cfg
import logging from oslo_log import log as logging
global loaded, NOVA_VENDOR, NOVA_PRODUCT, NOVA_PACKAGE global loaded, NOVA_VENDOR, NOVA_PRODUCT, NOVA_PACKAGE
if loaded: if loaded: