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 72043ab3..b7a49fdb 100644
--- a/tests/logger.py
+++ b/tests/logger.py
@@ -36,12 +36,11 @@ class Logger(object):
ch.setLevel(logging.INFO)
self.logger.addHandler(ch)
- file_handler = logging.FileHandler('%s.log' % logger_name)
+ 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)
-
def getLogger(self):
return self.logger
-