Currently the log messages from utils and openstack_utils
python modules are not logged into bgpvpn.log. This is
because this file is created during SDNVPN Feature
initialization. So creating this file during logger
initialization itself.
Change-Id: I538acdfb2119f1eaa562f61dac3b6bf7c3a58e41
Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
# http://www.apache.org/licenses/LICENSE-2.0
#
import logging
# http://www.apache.org/licenses/LICENSE-2.0
#
import logging
from xtesting.core import feature
from xtesting.core import feature
def getLogger(module_name):
logger = logging.getLogger(module_name)
log_file = "{}/{}.log".format("/var/lib/xtesting/results", "bgpvpn")
def getLogger(module_name):
logger = logging.getLogger(module_name)
log_file = "{}/{}.log".format("/var/lib/xtesting/results", "bgpvpn")
- if os.path.exists(log_file):
- feature.Feature.configure_logger(logger, log_file)
- else:
- logger.setLevel(logging.DEBUG)
+ open(log_file, 'w+')
+ feature.Feature.configure_logger(logger, log_file)