summaryrefslogtreecommitdiffstats
path: root/utils/logger.py
diff options
context:
space:
mode:
authorliyin <liyin11@huawei.com>2017-02-07 15:29:50 +0800
committerAce Lee <liyin11@huawei.com>2017-02-09 05:10:52 +0000
commit0a29e9ec59e21dc46db0497187cc9d0de0844b05 (patch)
tree5222fd128df289fa3f6e56621c1a8af273e1eab3 /utils/logger.py
parentfd7583e843493495e5e15f62b5f7d9ca484bf167 (diff)
Log_dir bug fix&Add function of test_ip init
JIRA:BOTTLENECK-129 This patch fix the error of log_dir can't be found. And change several thing: 1.Add if config don't have test_ip, it will use local:8888 as test ip. 2.Fix the bug in setup.py. 3.Add parser init to logger file. Change-Id: I808c69e2b2ff3c04f271cc7f3e14e1ab406a4d1b Signed-off-by: liyin <liyin11@huawei.com>
Diffstat (limited to 'utils/logger.py')
-rw-r--r--utils/logger.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/logger.py b/utils/logger.py
index 80392f59..5ce64238 100644
--- a/utils/logger.py
+++ b/utils/logger.py
@@ -19,7 +19,8 @@
import logging
import os
-from utils.parser import Parser as conf
+from utils.parser import Parser as conf_parser
+conf_parser.config_init()
class Logger:
@@ -47,7 +48,7 @@ class Logger:
ch.setLevel(logging.INFO)
self.logger.addHandler(ch)
- result_path = conf.bottlenecks_config["log_dir"]
+ result_path = conf_parser.bottlenecks_config["log_dir"]
if not os.path.exists(result_path):
os.makedirs(result_path)
result_file = os.path.join(result_path, 'bottlenecks.log')