Merge "vnf_generic: replace list comprehension with generator expression"
[yardstick.git] / yardstick / __init__.py
index 5c279c8..fbbc101 100644 (file)
@@ -7,17 +7,21 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
 
+from __future__ import absolute_import
 import logging
 import os
 import sys
 
 import yardstick.vTC.apexlake as apexlake
+from yardstick.common import constants
+from yardstick.common import utils as yardstick_utils
 
 # Hack to be able to run apexlake unit tests
 # without having to install apexlake.
 sys.path.append(os.path.dirname(apexlake.__file__))
 
-LOG_FILE = '/tmp/yardstick.log'
+yardstick_utils.makedirs(constants.YARDSTICK_LOG_DIR)
+LOG_FILE = os.path.join(constants.YARDSTICK_LOG_DIR, 'yardstick.log')
 LOG_FORMATTER = ('%(asctime)s '
                  '%(name)s %(filename)s:%(lineno)d '
                  '%(levelname)s %(message)s')