Fix logic of prepare_logger function

Logic of adding file handler for logger being setting up fixed.

Change-Id: I027440083eeb4ea23a5316ad3f9a38824e1aed1b
Closes-Bug: #1523476
This commit is contained in:
Artem Roma 2016-02-03 17:41:49 +02:00
parent 043fa47d93
commit ad8f5cb8f3
1 changed files with 1 additions and 1 deletions

View File

@ -121,7 +121,7 @@ def delete_node_logs(node, prefix=settings.SYSLOG_DIR):
def prepare_submodule_logger(submodule_name, file_path=None):
logger = logging.getLogger(submodule_name)
if file_path is None:
if file_path is not None:
handler = logging.FileHandler(file_path)
else:
handler = logging.StreamHandler(sys.stdout)