From a2c96362067e32d569b8a02ca0ec022195e54b35 Mon Sep 17 00:00:00 2001 From: "jose.lausuch" Date: Wed, 27 Apr 2016 16:28:55 +0200 Subject: Replace all the loggers by the functest logger module JIRA: FUNCTEST-228 Change-Id: If7a3c8cb08e9fbdf155fc5eff5330f79e5f8d234 Signed-off-by: jose.lausuch --- testcases/Controllers/ONOS/Teston/CI/onosfunctest.py | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'testcases/Controllers') diff --git a/testcases/Controllers/ONOS/Teston/CI/onosfunctest.py b/testcases/Controllers/ONOS/Teston/CI/onosfunctest.py index f106526af..b9ddbf78f 100644 --- a/testcases/Controllers/ONOS/Teston/CI/onosfunctest.py +++ b/testcases/Controllers/ONOS/Teston/CI/onosfunctest.py @@ -16,30 +16,19 @@ lanqinglong@huawei.com import argparse import datetime -import logging import os import re import time import yaml +import functest.utils.functest_logger as ft_logger import functest.utils.functest_utils as functest_utils parser = argparse.ArgumentParser() parser.add_argument("-i", "--installer", help="Installer type") args = parser.parse_args() """ logging configuration """ - -logger = logging.getLogger('onos') -logger.setLevel(logging.DEBUG) - -ch = logging.StreamHandler() - - -formatter = logging.Formatter('%(asctime)s - %(name)s' - '- %(levelname)s - %(message)s') - -ch.setFormatter(formatter) -logger.addHandler(ch) +logger = ft_logger.Logger("onos").getLogger() with open("/home/opnfv/functest/conf/config_functest.yaml") as f: functest_yaml = yaml.safe_load(f) -- cgit 1.2.3-korg