summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuan Vidal <juan.vidal.allende@ericsson.com>2017-02-20 07:52:57 +0000
committerJuan Vidal <juan.vidal.allende@ericsson.com>2017-02-20 08:06:46 +0000
commit60bc3dddb055cc1ec53196a474743790e6395dce (patch)
tree79563e4829f61de7cadc5908568b33026052546a
parent72b6571f2b448e27a1d8c50dd8f27e564004d687 (diff)
Use __name__ on Logger instantiation instead of custom strings
Change-Id: Ic68256410b29cf3ba39a10a92d243979ea475220 Signed-off-by: Juan Vidal <juan.vidal.allende@ericsson.com>
-rw-r--r--sfc/lib/config.py2
-rw-r--r--sfc/lib/results.py2
-rw-r--r--sfc/lib/utils.py2
-rw-r--r--sfc/tests/functest/run_tests.py2
-rw-r--r--sfc/tests/functest/setup_scripts/prepare_odl_sfc.py2
-rw-r--r--sfc/tests/functest/sfc_one_chain_two_service_functions_different_computes.py3
-rw-r--r--sfc/tests/functest/sfc_symmetric_chain.py2
-rw-r--r--sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py3
8 files changed, 8 insertions, 10 deletions
diff --git a/sfc/lib/config.py b/sfc/lib/config.py
index f5a07013..3ef8514e 100644
--- a/sfc/lib/config.py
+++ b/sfc/lib/config.py
@@ -16,7 +16,7 @@ import functest.utils.functest_logger as ft_logger
import functest.utils.functest_utils as ft_utils
-logger = ft_logger.Logger("sfc_test_config").getLogger()
+logger = ft_logger.Logger(__name__).getLogger()
class CommonConfig(object):
diff --git a/sfc/lib/results.py b/sfc/lib/results.py
index 5fa9aa05..c5172cb2 100644
--- a/sfc/lib/results.py
+++ b/sfc/lib/results.py
@@ -10,7 +10,7 @@
import functest.utils.functest_logger as ft_logger
-logger = ft_logger.Logger("sfc-results").getLogger()
+logger = ft_logger.Logger(__name__).getLogger()
class Results(object):
diff --git a/sfc/lib/utils.py b/sfc/lib/utils.py
index 2b01113c..a7edef68 100644
--- a/sfc/lib/utils.py
+++ b/sfc/lib/utils.py
@@ -20,7 +20,7 @@ import functest.utils.openstack_utils as os_utils
import functest.utils.openstack_tacker as os_tacker
-logger = ft_logger.Logger("sfc_test_utils").getLogger()
+logger = ft_logger.Logger(__name__).getLogger()
SSH_OPTIONS = '-q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
FUNCTEST_RESULTS_DIR = os.path.join("home", "opnfv",
"functest", "results", "odl-sfc")
diff --git a/sfc/tests/functest/run_tests.py b/sfc/tests/functest/run_tests.py
index 7214dd94..3c97a711 100644
--- a/sfc/tests/functest/run_tests.py
+++ b/sfc/tests/functest/run_tests.py
@@ -29,7 +29,7 @@ parser.add_argument("-r", "--report",
action="store_true")
args = parser.parse_args()
-logger = ft_logger.Logger("sfc-run-tests").getLogger()
+logger = ft_logger.Logger(__name__).getLogger()
COMMON_CONFIG = sfc_config.CommonConfig()
diff --git a/sfc/tests/functest/setup_scripts/prepare_odl_sfc.py b/sfc/tests/functest/setup_scripts/prepare_odl_sfc.py
index 05990a08..1ddf36a6 100644
--- a/sfc/tests/functest/setup_scripts/prepare_odl_sfc.py
+++ b/sfc/tests/functest/setup_scripts/prepare_odl_sfc.py
@@ -18,7 +18,7 @@ import sys
import functest.utils.functest_logger as ft_logger
-logger = ft_logger.Logger("ODL_SFC").getLogger()
+logger = ft_logger.Logger(__name__).getLogger()
SFC_REPO_DIR = "/home/opnfv/repos/sfc"
diff --git a/sfc/tests/functest/sfc_one_chain_two_service_functions_different_computes.py b/sfc/tests/functest/sfc_one_chain_two_service_functions_different_computes.py
index 68ceeda0..72408897 100644
--- a/sfc/tests/functest/sfc_one_chain_two_service_functions_different_computes.py
+++ b/sfc/tests/functest/sfc_one_chain_two_service_functions_different_computes.py
@@ -30,8 +30,7 @@ parser.add_argument("-r", "--report",
args = parser.parse_args()
-""" logging configuration """
-logger = ft_logger.Logger("ODL_SFC").getLogger()
+logger = ft_logger.Logger(__name__).getLogger()
REPO_PATH = os.path.join(os.environ['REPOS_DIR'], 'sfc/')
SFC_TEST_DIR = os.path.join(REPO_PATH, "sfc/tests/functest")
diff --git a/sfc/tests/functest/sfc_symmetric_chain.py b/sfc/tests/functest/sfc_symmetric_chain.py
index 87e6f594..6ac8c1b6 100644
--- a/sfc/tests/functest/sfc_symmetric_chain.py
+++ b/sfc/tests/functest/sfc_symmetric_chain.py
@@ -24,7 +24,7 @@ import sfc.lib.utils as test_utils
from sfc.lib.results import Results
-logger = ft_logger.Logger("ODL_SFC").getLogger()
+logger = ft_logger.Logger(__name__).getLogger()
CLIENT = "client"
SERVER = "server"
diff --git a/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py b/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py
index 123b1cad..99e5d67e 100644
--- a/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py
+++ b/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py
@@ -24,8 +24,7 @@ from opnfv.deployment.factory import Factory as DeploymentFactory
import sfc.lib.topology_shuffler as topo_shuffler
-""" logging configuration """
-logger = ft_logger.Logger("ODL_SFC").getLogger()
+logger = ft_logger.Logger(__name__).getLogger()
CLIENT = "client"
SERVER = "server"