summaryrefslogtreecommitdiffstats
path: root/dovetail/utils
diff options
context:
space:
mode:
Diffstat (limited to 'dovetail/utils')
-rw-r--r--dovetail/utils/dovetail_logger.py14
1 files changed, 2 insertions, 12 deletions
diff --git a/dovetail/utils/dovetail_logger.py b/dovetail/utils/dovetail_logger.py
index 6a2d38d5..8afa08a1 100644
--- a/dovetail/utils/dovetail_logger.py
+++ b/dovetail/utils/dovetail_logger.py
@@ -25,22 +25,12 @@ import logging
import os
from conf.dovetail_config import DovetailConfig as dt_config
-import dovetail_utils as dt_utils
-
-
-def clean_results_dir():
- result_path = dt_config.dovetail_config['result_dir']
- if os.path.exists(result_path):
- cmd = 'sudo rm -rf %s/*' % (result_path)
- dt_utils.exec_cmd(cmd, exit_on_error=False)
-
-clean_results_dir()
class Logger:
def __init__(self, logger_name):
- CI_DEBUG = os.getenv('CI_DEBUG')
+ DEBUG = os.getenv('DEBUG')
self.logger = logging.getLogger(logger_name)
self.logger.propagate = 0
@@ -50,7 +40,7 @@ class Logger:
formatter = logging.Formatter('%(asctime)s - %(name)s - '
'%(levelname)s - %(message)s')
ch.setFormatter(formatter)
- if CI_DEBUG is not None and CI_DEBUG.lower() == "true":
+ if DEBUG is not None and DEBUG.lower() == "true":
ch.setLevel(logging.DEBUG)
else:
ch.setLevel(logging.INFO)