summaryrefslogtreecommitdiffstats
path: root/tests/logger.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/logger.py')
-rw-r--r--tests/logger.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/logger.py b/tests/logger.py
index 80d19bb9..b7a49fdb 100644
--- a/tests/logger.py
+++ b/tests/logger.py
@@ -21,8 +21,6 @@ class Logger(object):
CI_DEBUG = os.getenv('CI_DEBUG')
- filename = '%s.log' % logger_name
- logging.basicConfig(filemode='w', filename=filename)
self.logger = logging.getLogger(logger_name)
self.logger.propagate = 0
self.logger.setLevel(logging.DEBUG)
@@ -38,7 +36,8 @@ class Logger(object):
ch.setLevel(logging.INFO)
self.logger.addHandler(ch)
- file_handler = logging.FileHandler(filename)
+ filename = '%s.log' % logger_name
+ file_handler = logging.FileHandler(filename, mode='w')
file_handler.setFormatter(formatter)
file_handler.setLevel(logging.DEBUG)
self.logger.addHandler(file_handler)