Commit 8da2c253 authored by Guillaume Seguin's avatar Guillaume Seguin

Fix #587: don't try to log when log path is empty

parent b207ee82
......@@ -56,7 +56,7 @@ def setup_logging(out, filepath = None, reset_handlers = False):
logging_handler = logging.StreamHandler(out)
logging_handler.setFormatter(formatter)
logger.addHandler(logging_handler)
if filepath is not None:
if filepath:
formatter = LogFormatter("%(asctime)s - [%(levelname)s] %(message)s", "%(asctime)s - %(message)s")
logging_handler = logging.FileHandler(filepath)
logging_handler.setFormatter(formatter)
......
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