aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/core/task.py
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2017-08-17 01:58:52 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-08-17 01:58:52 +0000
commit255ae5b1e6e85f118ef42298bfbc8dce1ad1969f (patch)
treec64b1767e534ba400a8627c6bdf7a3841c746c11 /yardstick/benchmark/core/task.py
parent9c6eba101c7b656d077b95cf5d028551b0460aa1 (diff)
parent7053020cfd7fc3ed93bdd83ca4b70a2e95818daa (diff)
Merge "utils: create TASK_LOG_DIR if it doesn't exist"
Diffstat (limited to 'yardstick/benchmark/core/task.py')
-rw-r--r--yardstick/benchmark/core/task.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/yardstick/benchmark/core/task.py b/yardstick/benchmark/core/task.py
index f689f2e63..2c67e736c 100644
--- a/yardstick/benchmark/core/task.py
+++ b/yardstick/benchmark/core/task.py
@@ -173,6 +173,7 @@ class Task(object): # pragma: no cover
log_format = '%(asctime)s %(name)s %(filename)s:%(lineno)d %(levelname)s %(message)s'
log_formatter = logging.Formatter(log_format)
+ utils.makedirs(constants.TASK_LOG_DIR)
log_path = os.path.join(constants.TASK_LOG_DIR, '{}.log'.format(self.task_id))
log_handler = logging.FileHandler(log_path)
log_handler.setFormatter(log_formatter)