Change-Id: I97e4f0cf8f27ff719253967ac14e74bcd55b0559
Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
# http://www.apache.org/licenses/LICENSE-2.0
#
import logging
+import os.path
from xtesting.core import feature
def getLogger(module_name):
logger = logging.getLogger(module_name)
log_file = "{}/{}.log".format("/var/lib/xtesting/results", "bgpvpn")
- open(log_file, 'w+')
+ if not os.path.exists(log_file):
+ open(log_file, 'w+')
feature.Feature.configure_logger(logger, log_file)
return logger