From 72014bc1be666ce581602eb1d7a809df287ed937 Mon Sep 17 00:00:00 2001 From: Cady_Chen Date: Wed, 16 Nov 2016 09:43:49 +0800 Subject: [PATCH] Replace directly import of logging with import oslo_log The oslo.log (logging) configuration library provides standardized configuration for all openstack projects. It also provides custom formatters, handlers and support for context specific logging (like resource id's etc). It is better to use the common logging module. Change-Id: I45933a0256e71f3d51e7b5f4ef5de782e2fa27cf --- tempest/api/compute/servers/test_server_actions.py | 3 +-- tempest/api/orchestration/stacks/test_neutron_resources.py | 4 +--- tempest/cmd/main.py | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/tempest/api/compute/servers/test_server_actions.py b/tempest/api/compute/servers/test_server_actions.py index 50910ec8f3..0a94d5ec14 100644 --- a/tempest/api/compute/servers/test_server_actions.py +++ b/tempest/api/compute/servers/test_server_actions.py @@ -13,8 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -import logging - +from oslo_log import log as logging from six.moves.urllib import parse as urlparse import testtools diff --git a/tempest/api/orchestration/stacks/test_neutron_resources.py b/tempest/api/orchestration/stacks/test_neutron_resources.py index a3792b49bc..bffcb644e9 100644 --- a/tempest/api/orchestration/stacks/test_neutron_resources.py +++ b/tempest/api/orchestration/stacks/test_neutron_resources.py @@ -10,10 +10,8 @@ # License for the specific language governing permissions and limitations # under the License. - -import logging - import netaddr +from oslo_log import log as logging from tempest.api.orchestration import base from tempest.common.utils import data_utils diff --git a/tempest/cmd/main.py b/tempest/cmd/main.py index 641d11c54b..1090c41b10 100644 --- a/tempest/cmd/main.py +++ b/tempest/cmd/main.py @@ -11,11 +11,11 @@ # License for the specific language governing permissions and limitations # under the License. -import logging import sys from cliff import app from cliff import commandmanager +from oslo_log import log as logging from pbr import version