Commit b5a7a6bd authored by Betoule Marc's avatar Betoule Marc
Browse files

Correct non closed log files problem

parent 2bf47727
......@@ -402,4 +402,6 @@ class Environment(EnvironmentBase):
except:
res = []
self.logger.info("No segment output found, setting seg_output to None")
for h in self.logger.handlers:
h.close()
return res
......@@ -252,7 +252,7 @@ def init_logger (name, filename, level=logging.DEBUG):
logger = logging.getLogger(name)
logger.setLevel(logging.DEBUG)
if (len(logger.handlers) < 4):
if (len(logger.handlers) < 2):
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
if filename:
rfhandler = logging.handlers.RotatingFileHandler(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment