summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinda Wang <wangwulin@huawei.com>2017-05-15 06:54:41 +0000
committerLinda Wang <wangwulin@huawei.com>2017-05-15 07:01:37 +0000
commite5691c01975e9a3867a17c4fd9b4427bb15f0f10 (patch)
treeab48c1786a8242fbc68392a56a4fc740bb69ed68
parent41c803455971d76e7a6d8cd9cde3371525138db9 (diff)
Update logger via logging.getLogger()
1. The module functest.utils.functest_logger has been deleted and logger has been reconfigured in functest [1]. 2. Update run_tests.py to get loggers via logging.getLogger(). [1] https://gerrit.opnfv.org/gerrit/#/c/34019/ JIRA: FUNCTEST-824 Change-Id: I34d73aadc420a5381651d65fb6b55f0f58e0c11e Signed-off-by: Linda Wang <wangwulin@huawei.com>
-rw-r--r--promise/test/functest/run_tests.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/promise/test/functest/run_tests.py b/promise/test/functest/run_tests.py
index 14a621c..17f915b 100644
--- a/promise/test/functest/run_tests.py
+++ b/promise/test/functest/run_tests.py
@@ -9,13 +9,14 @@
#
import argparse
import json
+import logging
+import logging.config
import os
import re
import subprocess
import sys
import time
-import functest.utils.functest_logger as ft_logger
import functest.utils.openstack_utils as os_utils
from functest.utils.constants import CONST
@@ -55,7 +56,7 @@ PROMISE_ROUTER_NAME = CONST.promise_router_name
""" logging configuration """
-logger = ft_logger.Logger("promise").getLogger()
+logger = logging.getLogger('promise')
def main():
@@ -250,4 +251,6 @@ def main():
if __name__ == '__main__':
+ logging.config.fileConfig(
+ CONST.__getattribute__('dir_functest_logging_cfg'))
sys.exit(main())